Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Conan 2.0.11+ choose wrong default cppstd for apple-clang #14835

Closed
sizeak opened this issue Sep 27, 2023 · 2 comments · Fixed by #14837
Closed

[bug] Conan 2.0.11+ choose wrong default cppstd for apple-clang #14835

sizeak opened this issue Sep 27, 2023 · 2 comments · Fixed by #14837
Assignees
Labels
Milestone

Comments

@sizeak
Copy link

sizeak commented Sep 27, 2023

Environment details

  • Operating System+version: macOS 13.6
  • Compiler+version: apple-clang 14.0
  • Conan version: 2.0.11 & 2.0.12
  • Python version: 3.11.5

Steps to reproduce

python -m pip install --upgrade conan==2.0.11
conan profile detect --force

I believe this is caused by the removal of

    if compiler != "msvc":
        cppstd = _cppstd_default(compiler, version)
        if compiler == "apple-clang" and version >= "11":
            # forced auto-detection, gnu98 is too old
            cppstd = "gnu17"
        result.append(("compiler.cppstd", cppstd))

in this commit 7f6430a#diff-054375ca45a4ad879799d84fd9d02d0aae4e517cf4a6be98134ff446712d833d

Logs

detect_api: apple-clang>=13, using the major as version

Detected profile:
WARN: This profile is a guess of your environment, please check it.
WARN: Defaulted to cppstd='gnu17' for apple-clang.
WARN: The output of this command is not guaranteed to be stable and can change in future Conan versions.
WARN: Use your own profile files for stability.
Saving detected profile to /Users/runner/.conan2/profiles/default
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu98
compiler.libcxx=libc++
compiler.version=14
os=Macos
@AbrilRBS
Copy link
Member

Hi @simoncent thanks a lot for taking the time to report the issue, you're totally right, it's a byproduct of moving the detection api in the PR you pointed at. I've submitted #14837 and fixed the relevant tests that made this possible in the first time :)

The fix will be released in the next few days in the 2.0.13 version

@sizeak
Copy link
Author

sizeak commented Sep 28, 2023

Excellent, thanks for the quick remediation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants