diff options
| author | Peter Harris <pharris2@rocketsoftware.com> | 2025-05-12 14:51:07 -0400 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-05-13 09:44:22 -0700 |
| commit | 043ff22fc732ac25fab9b1d59e66cc59c493d07f (patch) | |
| tree | de8e8efe0a2dd4c1d0039f48ad3b9560559accce /mesonbuild/compilers/cpp.py | |
| parent | 25854d75846ea9fea357e3b28c5242ffe48dda79 (diff) | |
| download | meson-043ff22fc732ac25fab9b1d59e66cc59c493d07f.tar.gz | |
cpp: Fix cpp_std=vc++14
Fixes a regression introduced in commit d37d649b08b8 "Make all Meson level
options overridable per subproject." This change results in every file
printing the warning "cl : Command line warning D9002 : ignoring unknown
option '/std:vc++14'"
Now that "get_option_..." is called before overwriting the option (instead
of after), we have to operate on compiler options, not meson options.
There is no such compiler option as /std:vc++14 (the meson option vc++xx is
split into /std:c++xx for the C++ standard version, and a separate flag
that enables Microsoft extensions). Remove the mapping from c++14 to
vc++14.
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
| -rw-r--r-- | mesonbuild/compilers/cpp.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index f7dc150e8..ed8d1cf05 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -880,8 +880,7 @@ class CPP11AsCPP14Mixin(CompilerMixinBase): 'attempting best effort; setting the standard to C++14', once=True, fatal=False) original_args = super().get_option_std_args(target, env, subproject) - std_mapping = {'/std:c++11': '/std:c++14', - '/std:c++14': '/std:vc++14'} + std_mapping = {'/std:c++11': '/std:c++14'} processed_args = [std_mapping.get(x, x) for x in original_args] return processed_args |
