aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorElliot Haisley <35050275+Apache-HB@users.noreply.github.com>2020-07-18 15:34:24 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2020-07-19 15:26:30 +0300
commit063b74ebba51133d5a79b86c984165c6709ad9d8 (patch)
tree5056644a9f61308ed5bd01ed58fe0d2cac37007f /test cases
parent43129a11edab304c98e94af4d894f5f872617fa5 (diff)
downloadmeson-063b74ebba51133d5a79b86c984165c6709ad9d8.zip
meson-063b74ebba51133d5a79b86c984165c6709ad9d8.tar.gz
meson-063b74ebba51133d5a79b86c984165c6709ad9d8.tar.bz2
fix msvc not recognising b_ndebug
fixes #7404
Diffstat (limited to 'test cases')
-rw-r--r--test cases/windows/17 msvc ndebug/main.cpp9
-rw-r--r--test cases/windows/17 msvc ndebug/meson.build7
2 files changed, 16 insertions, 0 deletions
diff --git a/test cases/windows/17 msvc ndebug/main.cpp b/test cases/windows/17 msvc ndebug/main.cpp
new file mode 100644
index 0000000..d647d71
--- /dev/null
+++ b/test cases/windows/17 msvc ndebug/main.cpp
@@ -0,0 +1,9 @@
+int main() {
+#ifdef NDEBUG
+ // NDEBUG is defined
+ return 0;
+#else
+ // NDEBUG is not defined
+ return 1;
+#endif
+} \ No newline at end of file
diff --git a/test cases/windows/17 msvc ndebug/meson.build b/test cases/windows/17 msvc ndebug/meson.build
new file mode 100644
index 0000000..78eaf89
--- /dev/null
+++ b/test cases/windows/17 msvc ndebug/meson.build
@@ -0,0 +1,7 @@
+project('msvc_ndebug', 'cpp',
+ default_options : [ 'b_ndebug=true' ]
+)
+
+exe = executable('exe', 'main.cpp')
+
+test('ndebug', exe)