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

[feature] compiler.cppstd should be set to the IDE default, if not provided. #8304

Closed
1 task done
dmn-star opened this issue Jan 8, 2021 · 2 comments
Closed
1 task done
Assignees

Comments

@dmn-star
Copy link

dmn-star commented Jan 8, 2021

All recent major IDEs (VS, XCode, Clion) pass the default IDE c++ language standard settings (-std=c++<...>) to the compiler. According Conan will detect the default language standard of compiler, if the compiler.cppstd option not set. But it will detect the default compiler mode only, what is not very useful.

@SSE4

Please follow conan-io/conan-center-index#3977

Visual Studio 2019 (default /std:c++14)
https://docs.microsoft.com/de-de/cpp/build/reference/std-specify-language-standard-version?view=msvc-160

XCode 12 (default /std:c++14)
(man clang )

Clion 2020 (default /std:c++14)
Clion_cpp_standard

vs.

C++98 (C++03) compiler defaults

https://gist.github.com/ax3l/53db9fa8a4f4c21ecc5c4100c0d93c94

@jgsogo
Copy link
Contributor

jgsogo commented Jan 20, 2021

Hi! There are many people using Conan and the compiler in the command line... and many CIs, I'm afraid we cannot change this default (sure we cannot do it in Conan 1.x, it will break behavior) and IMHO it wouldn't be a good idea. Anyway, the default is just the value chosen in the autodetect process and written to the file <cache>/profiles/default, you can change that profile and then your default will be different.

In Conan 2.0 (not 100% decided yet, but) it is likely we will stop auto-detecting automatically the default profile and it will be an explicit operation requiring confirmation by the user. So this should no longer be an issue.

@AbrilRBS
Copy link
Member

Closing as solved in Conan 2, in which conan profile detect must be run before being able to use Conan, which properly shows the detected configuration. Note that also recent improvements over the way profiles are handled (They are Jinja templates now) and the addition of the detect_api to be used within the profiles leaves lots of customization for power users :)

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

No branches or pull requests

3 participants