summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 3a4b456..c38bab5 100644
--- a/meson.build
+++ b/meson.build
@@ -5,10 +5,14 @@ project(
license: 'LGPL-3.0',
default_options: ['cpp_std=c++17', 'default_library=both'])
+cpp_compiler = meson.get_compiler('cpp')
add_global_arguments('-D_MODERN_SQLITE_BOOST_OPTIONAL_SUPPORT', language: 'cpp')
+if cpp_compiler.get_id() == 'msvc'
+ # Ask MSVC to populate the __cplusplus macro properly.
+ add_global_arguments('/Zc:__cplusplus', language: 'cpp')
+endif
# libdl is "special", not like other dependencies
-cpp_compiler = meson.get_compiler('cpp')
dl_dep = cpp_compiler.find_library('dl', required: false)
thread_dep = dependency('threads')