aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/exess/bindings/cpp/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-25 10:27:59 -0500
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commitc4821c8e6bf1f81c6ea31e11ebc0fc1666e9337b (patch)
treea62995534f5f606ac2f8bae22d525532b824cb5e /subprojects/exess/bindings/cpp/meson.build
parent6bcd18ae60482790b645a345f718e7099250f261 (diff)
downloadserd-c4821c8e6bf1f81c6ea31e11ebc0fc1666e9337b.tar.gz
serd-c4821c8e6bf1f81c6ea31e11ebc0fc1666e9337b.tar.bz2
serd-c4821c8e6bf1f81c6ea31e11ebc0fc1666e9337b.zip
Add exess from git@gitlab.com:drobilla/exess.git 4638b1f
Diffstat (limited to 'subprojects/exess/bindings/cpp/meson.build')
-rw-r--r--subprojects/exess/bindings/cpp/meson.build54
1 files changed, 54 insertions, 0 deletions
diff --git a/subprojects/exess/bindings/cpp/meson.build b/subprojects/exess/bindings/cpp/meson.build
new file mode 100644
index 00000000..61e3616e
--- /dev/null
+++ b/subprojects/exess/bindings/cpp/meson.build
@@ -0,0 +1,54 @@
+add_languages(['cpp'])
+cpp = meson.get_compiler('cpp')
+
+# Set ultra strict warnings for developers, if requested
+if get_option('strict')
+ if cpp.get_id() == 'clang'
+ cpp_suppressions = [
+ '-Wno-c++14-extensions',
+ '-Wno-c++98-compat',
+ '-Wno-c++98-compat-pedantic',
+ '-Wno-documentation-unknown-command',
+ '-Wno-nullability-extension',
+ '-Wno-padded',
+ ]
+
+ elif cpp.get_id() == 'gcc'
+ cpp_suppressions = [
+ '-Wno-inline',
+ '-Wno-padded',
+ '-Wno-switch-default',
+ '-Wno-unused-const-variable',
+ '-Wno-useless-cast',
+ ]
+
+ elif cpp.get_id() == 'msvc'
+ cpp_suppressions = [
+ '/wd4028', # formal parameter different from declaration
+ '/wd4204', # nonstandard extension: non-constant aggregate initializer
+ '/wd4706', # assignment within conditional expression
+ '/wd4710', # function not inlined
+ '/wd4711', # function selected for automatic inline expansion
+ '/wd4820', # padding added after data member
+ '/wd5045', # will insert Spectre mitigation
+ ]
+ endif
+
+else
+ if cpp.get_id() == 'clang'
+ cpp_suppressions = [
+ '-Wno-nullability-extension',
+ ]
+ endif
+endif
+
+exess_cpp_args = cc.get_supported_arguments(cpp_suppressions)
+
+cpp_headers = ['include/exess/exess.hpp']
+cpp_header_files = files(cpp_headers)
+
+exess_hpp_dep = declare_dependency(
+ dependencies: exess_dep,
+ include_directories: include_directories('include'))
+
+subdir('test')