Skip to content

Commit

Permalink
meson: do not always overwrite default cpp_std (#6895)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheQwertiest committed May 18, 2020
1 parent aaacc42 commit 7f0390c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions conans/client/build/meson.py
Expand Up @@ -47,14 +47,15 @@ def __init__(self, conanfile, backend=None, build_type=None, append_vcvars=False
# C++ standard
cppstd = cppstd_from_settings(self._conanfile.settings)
cppstd_conan2meson = {
None: 'none',
'98': 'c++03', 'gnu98': 'gnu++03',
'11': 'c++11', 'gnu11': 'gnu++11',
'14': 'c++14', 'gnu14': 'gnu++14',
'17': 'c++17', 'gnu17': 'gnu++17',
'20': 'c++1z', 'gnu20': 'gnu++1z'
}
self.options['cpp_std'] = cppstd_conan2meson[cppstd]

if cppstd:
self.options['cpp_std'] = cppstd_conan2meson[cppstd]

# shared
shared = self._so("shared")
Expand Down
3 changes: 1 addition & 2 deletions conans/test/unittests/client/build/meson_test.py
Expand Up @@ -74,8 +74,7 @@ def folders_test(self):
'bindir': 'bin',
'sbindir': 'bin',
'libexecdir': 'bin',
'includedir': 'include',
'cpp_std': 'none'
'includedir': 'include'
}

meson.configure(source_dir=os.path.join(self.tempdir, "../subdir"),
Expand Down

0 comments on commit 7f0390c

Please sign in to comment.