-
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
libcap: Modernize #15135
libcap: Modernize #15135
Conversation
Conan v1 pipelineAll green in build 2 (
Conan v2 pipeline (informative, not required for merge)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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -64,8 +61,10 @@ def generate(self): | |||
env.define("lib", "lib") | |||
|
|||
if cross_building(self) and not env.vars(self).get("BUILD_CC"): | |||
native_cc = "cc" | |||
self.output.info("Using native compiler '{}'".format(native_cc)) | |||
native_cc = VirtualBuildEnv(self).vars().get("CC") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice trick! The global.conf has compiler_executables
which can configure which compiler should be used, but it's automatically managed in Toolchain generators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uilianries I don't think BUILD_CC
is set automatically, is it? I used @SpaceIm's trick from the Boost recipe here, but I can't actually determine the compiler_executables
in the build context, see issue #12860.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BUILD_CC is not a standard env variable
pass | ||
self.options.rm_safe("fPIC") | ||
self.settings.rm_safe("compiler.libcxx") | ||
self.settings.rm_safe("compiler.cppstd") | ||
|
||
def validate(self): | ||
if self.info.settings.os != "Linux": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SpaceIm I must be missing something obvious here, what needs corrected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.info
is not allowed in validate()
in conan v2 anymore. This is why I think it's urgent to not worry that much about small details of conan v2 beta to avoid polluting recipes with stuff we'll have to revert anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, thanks!
* libcap: Modernize * Add VirtualBuildEnv too
* libcap: Modernize * Add VirtualBuildEnv too
Specify library name and version: libcap/*