From d4fb5d6a943355c0519989b91607b207dbdb9e5f Mon Sep 17 00:00:00 2001 From: borg323 <39573933+borg323@users.noreply.github.com> Date: Tue, 24 Dec 2024 19:49:14 +0200 Subject: [PATCH] Update cpp language list for intel compiler on windows --- mesonbuild/compilers/cpp.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 5b654be5d1f7..2acc02ffe788 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -916,8 +916,13 @@ def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoic IntelVisualStudioLikeCompiler.__init__(self, target) def get_options(self) -> 'MutableKeyedOptionDictType': - # This has only been tested with version 19.0, - cpp_stds = ['none', 'c++11', 'vc++11', 'c++14', 'vc++14', 'c++17', 'vc++17', 'c++latest'] + # This has only been tested with version 19.0, 2021.2.1, 2024.4.2 and 2025.0.1 + if version_compare(self.version, '<2021.1.0'): + cpp_stds = ['none', 'c++11', 'vc++11', 'c++14', 'vc++14', 'c++17', 'vc++17', 'c++latest'] + else: + cpp_stds = ['none', 'c++14', 'c++17', 'c++latest'] + if version_compare(self.version, '>=2024.1.0'): + cpp_stds += ['c++20'] return self._get_options_impl(super().get_options(), cpp_stds) def get_compiler_check_args(self, mode: CompileCheckMode) -> T.List[str]: