Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
fixing virtualbuildenv #4583
referenced this pull request
Feb 20, 2019
Yes, I already added a test, not a unittest but a integration one, because it happened to be quite broken (and unittest doesn't catch those things), 2 things have to be fixed:
Please @lasote review.
Feb 26, 2019
(Windows) In trying to work around the issue until 1.13 is released, I discovered that the LIB environment variable "does not apply" unless UseEnv=true: You must do "SET UseEnv=True" (if launching Visual Studio from conanbuildenv prompt) or pass argument "/p:UseEnv=true" (if executing msbuild). See Remarks at https://docs.microsoft.com/en-us/visualstudio/ide/reference/useenv-devenv-exe?view=vs-2017.
I'm not sure what this means for conan. Maybe activate_build.bat should set this env var.
I am trying to use virtualbuildenv in lieu of updating dependent Visual Studio projects to reference the "conanbuildinfo_multi.props" generated property file.
Thanks for the info @jmoutray
self.run('activate_build.bat && cl /c /EHsc hello.cpp') self.run('activate_build.bat && lib hello.obj -OUT:helloapp.lib') self.run('activate_build.bat && cl /EHsc main.cpp helloapp.lib')
and it works fine, but yes, it is not the VS MSbuild system
We might try to have a look, but I don't think we will make it for Conan 1.13, because it is going to be released very soon, so we might need to wait.
I am not sure how far can you get doing this, because the
One more... There doesn't appear to be any way to pass the
Without the "8.1" argument, I get a linker error:
Yes, that might be an issue. As commented above, the virtualbuildenv, in case of Visual Studio/MSBuild might be a bit limited, and because of those limitations are inherent to VS/MSbuild, there is nothing that Conan could do.
In any case, the files created by generators are not to configure the build, they convey information strictly from dependencies. The build helpers like
The UseEnv=True has been added in #4655. It will be released next Conan 1.16, please update when it is released and give feedback if it doesn't work.
If the issue about