diff options
author | David Robillard <d@drobilla.net> | 2024-11-13 11:39:14 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-13 11:50:02 -0500 |
commit | 35e76431e5bdf24b67dc0b9a3f78367adb36b15c (patch) | |
tree | 2b9ad8cd52b1a50db3788be31a6ef20f4ce73359 | |
parent | 613997e29aff202492ab368768c57857640b23b2 (diff) | |
download | sord-35e76431e5bdf24b67dc0b9a3f78367adb36b15c.tar.gz sord-35e76431e5bdf24b67dc0b9a3f78367adb36b15c.tar.bz2 sord-35e76431e5bdf24b67dc0b9a3f78367adb36b15c.zip |
Fix build as C with MSVC
It used to be necessary to build modern C code as C++ with MSVC, but its C
support has become more or less serviceable, so remove the flag to force C++
mode and build as C everywhere.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | meson.build | 5 | ||||
-rw-r--r-- | meson/suppressions/meson.build | 4 | ||||
-rw-r--r-- | src/sord.c | 2 |
4 files changed, 3 insertions, 11 deletions
@@ -2,9 +2,10 @@ sord (0.16.17) unstable; urgency=medium * Add option to install tool man pages * Enable clang nullability checks + * Fix build as C with MSVC * Fix library current_version on MacOS - -- David Robillard <d@drobilla.net> Thu, 14 Mar 2024 18:12:02 +0000 + -- David Robillard <d@drobilla.net> Wed, 13 Nov 2024 16:38:32 +0000 sord (0.16.16) stable; urgency=medium diff --git a/meson.build b/meson.build index e4579d2..b1c9023 100644 --- a/meson.build +++ b/meson.build @@ -30,11 +30,6 @@ cc = meson.get_compiler('c') # Set global warning flags subdir('meson/suppressions') -# Build as C++ with MSVC -if cc.get_id() == 'msvc' - add_project_arguments(['/TP'], language: ['c']) -endif - ################ # Dependencies # ################ diff --git a/meson/suppressions/meson.build b/meson/suppressions/meson.build index cacc4f7..dda5b84 100644 --- a/meson/suppressions/meson.build +++ b/meson/suppressions/meson.build @@ -96,15 +96,11 @@ elif cc.get_id() == 'msvc' if warning_level == 'everything' c_suppressions += [ '/wd4061', # enumerator in switch is not explicitly handled - '/wd4200', # zero-sized array in struct/union '/wd4514', # unreferenced inline function has been removed '/wd4710', # function not inlined '/wd4711', # function selected for automatic inline expansion - '/wd4800', # implicit conversion from int to bool '/wd4820', # padding added after construct - '/wd4996', # POSIX name for this item is deprecated '/wd5045', # will insert Spectre mitigation for memory load - '/wd5264', # const variable is not used ] endif @@ -935,7 +935,7 @@ sord_get(SordModel* model, const SordNode* o, const SordNode* g) { - if ((bool)s + (bool)p + (bool)o != 2) { + if (!!s + !!p + !!o != 2) { return NULL; } |