blob: 06e0504a3cc18ba8e0e1dd7fa2a123557bce9616 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
project('importstd', 'cpp', default_options: {'cpp_importstd': 'true',
'cpp_std': 'c++latest,c++23,c++20'})
cpp = meson.get_compiler('cpp')
cpp_id = cpp.get_id()
cpp_version = cpp.version()
if cpp_id == 'gcc' and cpp_version.version_compare('>=15.3')
# Versions between 15.0 and 15.2 are too unreliable to test.
# The same version number of GCC works in some distros
# but fails in others.
istd_supported = true
elif cpp_id == 'msvc' and cpp_version.version_compare('>=19.44.35219')
istd_supported = get_option('backend') == 'ninja'
else
istd_supported = false
endif
if istd_supported
useistd = executable('useistd', 'useistd.cpp')
test('useistd', useistd)
else
message('Compiler not yet supported, import std test not run.')
endif
|