Skip to content

Commit

Permalink
intel-cc cppstd=03 failed (#13844)
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded authored May 8, 2023
1 parent 4dc3767 commit 83a0ed0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions conans/client/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
4 changes: 2 additions & 2 deletions conans/client/conf/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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")]

Expand Down
7 changes: 7 additions & 0 deletions conans/test/unittests/model/settings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 83a0ed0

Please sign in to comment.