-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
tl-expected: don't set CMAKE_CXX_STANDARD #7236
Conversation
this must be handled by conan_basic_setup
This comment has been minimized.
This comment has been minimized.
Ok but now you have to patch upstream CMakeLists with target_compile_features(tl-expected PUBLIC cxx_std_11) |
My take on this, is that letting cmake decide the cppstd on its own is not ok, because it leads to mixing several cppstds in the same dependency tree, which is wrong conan-io/conan#6157 (comment) |
I disagree, a good CMakeLists for a library must use |
what's the point of calling EDIT: I disagree with the "if set in profile" part of your message. cppstd consistency across all packages of a graph is a hard requirement, because it has an impact on ABI (conan-io/conan#6157 (comment) again) |
Do you want to break all recipes based on C++11 or higher? conan injects
Sure it's fine, it's exactly what I say. Does
cppstd is not needed, it's better to set it for consistency in final project.
It's a corner case. How many recipe in CCI have this issue, 2? 3? |
We don't have to break anything, my plan is to update recipes one by one using the following process:
cppstd is not a wish for upper/lower bound, it is a precise specification of the standard you want to be used across the dependency graph. This is why conan translates it to CMAKE_CXX_STANDARD, which is also an exact specification. Basically like all conan settings. ref #54 (comment)
to quote @SSE4 on conan-io/conan#6157 (comment), there are at least 2: gtest and fmt. See also https://cullmann.io/posts/cpp-standard-version-mix-up/ Regarding AppleClang, is the default cppstd really C++98 ? I found https://apple.stackexchange.com/a/393700 which says it's c++14 (and I don't have access to a mac, so I cannot do a quick test). AppleClang is a good example of the problem: All the users who did not explicitely define conan's setting for cppstd, and create projects using libraries requiring c++11 or later (I guess most of the libraries on CCI currently) get compilation errors like the one above. They probably will google the error message to understand the problem, which will tell them to use set CMAKE_CXX_STANDARD for cmake, or whatever equivalent for their build system. In addition to the ABI problem I already mentionned, this is a very bad user experience, which would be highly improved if conan told them their cppstd is not supported from the start. |
Failure in build 2 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
I'm completly against that, but I've already explained why.
The only pb I see, is that CMake like generators are not able to propagate |
:-)
yes, c++98/C++03 |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions. |
this must be handled by conan_basic_setup
Specify library name and version: tl-expected/*
conan-center hook activated.