Skip to content
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

MSBuild::build - Take into account 'useEnv' argument from user input #5609

Merged
merged 3 commits into from Aug 29, 2019

Conversation

@jgsogo
Copy link
Member

commented Aug 12, 2019

Changelog: Fix: Use the value of argument useEnv provided by the user to the MSBuild helper also to adjust /p:UseEnv=false when the arg is False.
Docs: omit

VisualStudioBuildEnvironment defaults useEnv=True, then if the user calls with MSBuild.build(...., use_env=False,...) the input was not taken into account. This PR complements the functionality introduced in #4655

@tags: slow

@jgsogo jgsogo changed the title use argument from user input MSBuild::build - Take into account 'useEnv' argument from user input Aug 12, 2019

@@ -154,6 +154,8 @@ def get_command(self, project_file, props_file_path=None, targets=None, upgrade_

if use_env:
command.append('/p:UseEnv=true')
else:
command.append('/p:UseEnv=false')

This comment has been minimized.

Copy link
@lasote

lasote Aug 19, 2019

Contributor

Mhhh, so the default of the msbuild is /p:UseEnv=true?

This comment has been minimized.

Copy link
@lasote

lasote Aug 19, 2019

Contributor

It looks like the default is not true, why we need to put it to false then?

UseEnv property
By default, the platform-specific settings for the current project override the PATH, INCLUDE, LIB, LIBPATH, CONFIGURATION, and PLATFORM environment variables. Set the UseEnv property to true to guarantee that the environment variables are not overridden.

msbuild myProject.vcxproj /p:UseEnv=true

This comment has been minimized.

Copy link
@lasote

lasote Aug 19, 2019

Contributor

I get it now. It takes it from the VisualStudioBuildEnvironment

@lasote lasote added this to the 1.18.2 milestone Aug 19, 2019

@lasote
Copy link
Contributor

left a comment

Update the changelog line.

@jgsogo

This comment has been minimized.

Copy link
Member Author

commented Aug 19, 2019

Done

@lasote lasote merged commit ee1c621 into conan-io:release/1.18.2 Aug 29, 2019

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@jgsogo jgsogo deleted the jgsogo:feat/vs-use_env branch Aug 29, 2019

AKhranovskiy pushed a commit to AKhranovskiy/conan that referenced this pull request Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.