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

MSVC check for installed versions - VS2017 in particular #3264

Merged
merged 28 commits into from
Jan 15, 2019

Conversation

dmoody256
Copy link
Contributor

@dmoody256 dmoody256 commented Jan 9, 2019

mailing list: https://pairlist4.pair.net/pipermail/scons-users/2019-January/007513.html

Things added in this PR:

[src] changes:

  • Update vc.py to check for cl.exe for VC 14.1 and newer, which use a new directory structure when searching for installed MSVC's.
  • Updated vswhere call to include finding Visual Studio build tools
  • Added 'arm' and 'arm64' target platforms as options to the msvc tool. Also updated vc.py to consider the platform when looking if a valid cl.exe is available when searching for installed MSVC's.
  • Updated function comments in vc.py and msvc.xml tool documentation.
  • Updated common.py to include the UWP environment variable when extracting vcvars script enivronment variables to the construction environment.
  • updated find_vs_dir_by_reg from vs.py to also use the VC dir as a way to find installed Visual Studios.

[test] changes:

  • added 4 tests to check Visual Studio 2017 project generation
  • updated UWP test to work with Visual Studio 2017 which uses new environment variable
  • updated TARGET_ARCH.py test to make sure arm and arm64 targets are working (only tested if installed)
  • updated TestSconsMSVS.py to include new project templates.

need to:

  • check cl.exe is in detected VC dir
  • if a TARGET_ARCH is in the env, check if the corresponding cl.exe exists
  • Fix MSVC_UWP_APP.py test so libfile paths work for msvc 14.1
  • Add support for arm targets (arm and arm64)
  • Add msvc tests for MSVC 14.1 and add test to check TARGET_ARCH is checking the right toolset for msvc

mwichmann and others added 10 commits November 18, 2018 14:35
Broaden the search to also include Build Tools (the compiler
without the whole Visual Studio works).  Also in the initial
search to see if a suite is valid or not, don't just look for
a couple of locations within a given path, do a search.

Signed-off-by: Mats Wichmann <mats@linux.com>
Polish up a few docstrings and be more descriptive about the
search for cl.exe.  Also add requested version qualifiers to
entry in CHANGES.txt.

Signed-off-by: Mats Wichmann <mats@linux.com>
Signed-off-by: Mats Wichmann <mats@linux.com>
vc.py: Some of the debug prints weren't quite right, and added a few.
When vswhere is called, it can return multiple lines if there
are multiple products that match, so handle that case.

Preparing for ARM support, add some host/target combos to the
table - currently commented out. arm/arm64 added to the canonicalize
table where it won't do any harm.

common.py: in case we eventually switch to more general logging,
use a specific logger rather than the root logger.

Signed-off-by: Mats Wichmann <mats@linux.com>
Signed-off-by: Mats Wichmann <mats@linux.com>
removed debug print
@dmoody256 dmoody256 force-pushed the msvc_use_script_to_check branch 2 times, most recently from 386a31b to bdad26b Compare January 9, 2019 17:13
fixed except check

revert some obsolete changes
@dmoody256
Copy link
Contributor Author

dmoody256 commented Jan 9, 2019

adding arm support would be related to #3182

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 79.745% when pulling 3e68e53 on dmoody256:msvc_use_script_to_check into 08877ad on SCons:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 79.745% when pulling 3e68e53 on dmoody256:msvc_use_script_to_check into 08877ad on SCons:master.

@coveralls
Copy link

coveralls commented Jan 10, 2019

Coverage Status

Coverage increased (+0.4%) to 80.371% when pulling 247001f on dmoody256:msvc_use_script_to_check into 0f782d0 on SCons:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 79.745% when pulling 3e68e53 on dmoody256:msvc_use_script_to_check into 08877ad on SCons:master.

@dmoody256 dmoody256 changed the title [WIP] fix MSVC check for installed versions fix MSVC check for installed versions Jan 12, 2019
@dmoody256
Copy link
Contributor Author

@bdbaddog could you close some of those sider issues? They are line to long issues in the VS project template tests.

@dmoody256
Copy link
Contributor Author

should fix #3268

Copy link
Contributor

@bdbaddog bdbaddog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bdbaddog could you close some of those sider issues? They are line to long issues in the VS project template tests.

Done

src/engine/SCons/Tool/MSCommon/vc.py Outdated Show resolved Hide resolved
@bdbaddog
Copy link
Contributor

Can you summarize at the top what you changed?

@dmoody256
Copy link
Contributor Author

Can you summarize at the top what you changed?

done and updated documentation

…set version file

updated other dict references
@bdbaddog
Copy link
Contributor

Great work!
Merging!

@bdbaddog bdbaddog merged commit f3739c4 into SCons:master Jan 15, 2019
@bdbaddog bdbaddog changed the title fix MSVC check for installed versions MSVC check for installed versions - VS2017 in particular Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants