-
Notifications
You must be signed in to change notification settings - Fork 980
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
[question] ability to call cppstd helpers in conan.tools.build within a package_id() method #16147
Comments
YES, PLEASE. This is quite a headache when trying to re-use the same checks in Doing |
@jcar87 I am checking this based on my PR #16456 because it is a bit dirty. I am thinking that: if self.info.settings.get_safe("compiler.cppstd") and not valid_max_cppstd(self, "14"):
self.info.settings.compiler.cppstd = "14" in the |
def generate():
cppstd = self.settings.get_safe("compiler.cppstd")
if cppstd and not valid_max_cppstd(self, "14"):
tc.cache_variables["CMAKE_CXX_STANDARD"] = "14" This wouldn't be aligned with the general strategy in ConanCenter packages @jcar87. This is overwriting and hardcoding defining settings, why many recipes do raise a |
This has been solved with the approach in #16871 The solution is to allow the The above practices, doing |
What is your question?
example use case
This fails because the implementation of
valid_max_cppstd()
accesssesself.settings
which is not allowed within apackage_id()
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: