From 83a0ed0978e8f5e5ff21f590cc193ebb6a3bd7b8 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 8 May 2023 15:43:55 +0200 Subject: [PATCH] intel-cc cppstd=03 failed (#13844) --- conans/client/conf/__init__.py | 4 ++-- conans/client/conf/detect.py | 4 ++-- conans/test/unittests/model/settings_test.py | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/conans/client/conf/__init__.py b/conans/client/conf/__init__.py index abda4b8d02e..cee70c2845c 100644 --- a/conans/client/conf/__init__.py +++ b/conans/client/conf/__init__.py @@ -104,7 +104,7 @@ update: [null, ANY] mode: ["icx", "classic", "dpcpp"] libcxx: [null, libstdc++, libstdc++11, libc++] - cppstd: [null, 98, gnu98, 03, gnu03, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] + cppstd: [null, 98, gnu98, "03", gnu03, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] runtime: [null, static, dynamic] runtime_type: [null, Debug, Release] qcc: @@ -128,4 +128,4 @@ def migrate_settings_file(cache): from conans.client.migrations import update_file settings_path = cache.settings_path - update_file(settings_path, get_default_settings_yml()) + update_file(settings_path, default_settings_yml) diff --git a/conans/client/conf/detect.py b/conans/client/conf/detect.py index 3d16310301e..f081a949e03 100644 --- a/conans/client/conf/detect.py +++ b/conans/client/conf/detect.py @@ -334,7 +334,7 @@ def _detected_architecture(): def _detect_os_arch(result): - from conans.client.conf import get_default_settings_yml + from conans.client.conf import default_settings_yml from conans.model.settings import Settings the_os = platform.system() @@ -346,7 +346,7 @@ def _detect_os_arch(result): if arch: if arch.startswith('arm'): - settings = Settings.loads(get_default_settings_yml()) + settings = Settings.loads(default_settings_yml) defined_architectures = settings.arch.values_range defined_arm_architectures = [v for v in defined_architectures if v.startswith("arm")] diff --git a/conans/test/unittests/model/settings_test.py b/conans/test/unittests/model/settings_test.py index a9e5b23781c..b80904ff3f6 100644 --- a/conans/test/unittests/model/settings_test.py +++ b/conans/test/unittests/model/settings_test.py @@ -436,3 +436,10 @@ def test_rm_safe(): with pytest.raises(Exception) as e: settings.compiler.libcxx = "libstdc++" assert "'settings.compiler.libcxx' doesn't exist for 'clang'" in str(e.value) + + +def test_settings_intel_cppstd_03(): + settings = Settings.loads(default_settings_yml) + settings.compiler = "intel-cc" + # This doesn't crash, it used to crash due to "03" not quoted in setting.yml + settings.compiler.cppstd = "03"