diff options
Diffstat (limited to '')
-rw-r--r-- | test cases/windows/19 msvc cplusplus define/main.cpp | 7 | ||||
-rw-r--r-- | test cases/windows/19 msvc cplusplus define/meson.build | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test cases/windows/19 msvc cplusplus define/main.cpp b/test cases/windows/19 msvc cplusplus define/main.cpp new file mode 100644 index 0000000..bc0b1fd --- /dev/null +++ b/test cases/windows/19 msvc cplusplus define/main.cpp @@ -0,0 +1,7 @@ +int main() { +#if __cplusplus == 199711L + return 1; +#else + return 0; +#endif +} diff --git a/test cases/windows/19 msvc cplusplus define/meson.build b/test cases/windows/19 msvc cplusplus define/meson.build new file mode 100644 index 0000000..9b85ff6 --- /dev/null +++ b/test cases/windows/19 msvc cplusplus define/meson.build @@ -0,0 +1,14 @@ +project('msvc __cplusplus', 'cpp', default_options : ['cpp_std=c++14']) + +cpp = meson.get_compiler('cpp') + +if cpp.get_id() != 'msvc' + error('MESON_SKIP_TEST: test is only relevant for msvc') +elif meson.project_version().version_compare('< 15.7') + error('MESON_SKIP_TEST: test is only relevant for msvc versions >= 15.7') +endif + +test( + 'main', + executable('main', 'main.cpp'), +) |