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
Fix: use self._run instead of self._conanfile.run to ensure vcvars apply for Ninja/NMake generators #3803
Conversation
a0e32bd
to
869c879
Compare
- ensure vcvars apply for Ninja/NMake generators Signed-off-by: SSE4 <tomskside@gmail.com>
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.
I remember this change was done some time ago. Was this tested somewhere? If not, we should write a test for it
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.
I remember this change (using vcvasr for ninja) was done some time ago. Was it tested somewhere? If not, it will require a proper test
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.
This makes sense, but it would deserve (a unit test, no need full integration test) a test
I am adding the test |
Signed-off-by: SSE4 <tomskside@gmail.com>
unit test has been added |
I am not sure about CI, it fails with strange error:
not sure how is it related to my changes, probably an infrastructure error, so please re-start build |
Fix: use self._run instead of self._conanfile.run to ensure vcvars apply for Ninja/NMake generators
follow up on #2803
when using
ninja_installer/1.8.2@bincrafters/stable
, right now the following code is required:I tried to simplify it in our
zmq/4.2.2@bincrafters/stable
recipe, but it currently fails, because there are places inCMake
helper which useself._conanfile.run
directly instead ofself._run
:https://github.com/conan-io/conan/blob/1.8.3/conans/client/build/cmake.py#L183
https://github.com/conan-io/conan/blob/1.8.3/conans/client/build/cmake.py#L185
Changelog: Fix:
vcvars
is also called in theCMake()
build helper when usingNinja
orNMake
generators.develop
branch, documenting this one.