diff options
author | Russel Winder <russel@winder.org.uk> | 2017-07-27 09:57:24 (GMT) |
---|---|---|
committer | Russel Winder <russel@winder.org.uk> | 2017-07-27 09:57:24 (GMT) |
commit | 61a7c43e98602536f1eecdae1a46475a7a0ab734 (patch) | |
tree | 89fd550c2ed78cd7c594f048367f6b9c0491d5cb /src/engine/SCons | |
parent | 1142cf4ebc2d0a05da8409265f890b40344d3c9e (diff) | |
parent | 120b1633f2bc371df744fce06f5c5024fe59a174 (diff) | |
download | SCons-61a7c43e98602536f1eecdae1a46475a7a0ab734.zip SCons-61a7c43e98602536f1eecdae1a46475a7a0ab734.tar.gz SCons-61a7c43e98602536f1eecdae1a46475a7a0ab734.tar.bz2 |
Merge in from mainline.
Diffstat (limited to 'src/engine/SCons')
-rw-r--r-- | src/engine/SCons/Tool/MSCommon/vc.py | 19 | ||||
-rw-r--r-- | src/engine/SCons/Tool/msvc.xml | 25 |
2 files changed, 38 insertions, 6 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 7b8dd9d..4126314 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -185,18 +185,17 @@ _VCVER_TO_PRODUCT_DIR = { } def msvc_version_to_maj_min(msvc_version): - msvc_version_numeric = ''.join([x for x in msvc_version if x in string_digits + '.']) t = msvc_version_numeric.split(".") if not len(t) == 2: - raise ValueError("Unrecognized version %s (%s)" % (msvc_version,msvc_version_numeric)) + raise ValueError("Unrecognized version %s (%s)" % (msvc_version,msvc_version_numeric)) try: - maj = int(t[0]) - min = int(t[1]) - return maj, min + maj = int(t[0]) + min = int(t[1]) + return maj, min except ValueError as e: - raise ValueError("Unrecognized version %s (%s)" % (msvc_version,msvc_version_numeric)) + raise ValueError("Unrecognized version %s (%s)" % (msvc_version,msvc_version_numeric)) def is_host_target_supported(host_target, msvc_version): """Return True if the given (host, target) tuple is supported given the @@ -435,6 +434,14 @@ def msvc_find_valid_batch_script(env,version): (host_target, version) SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg) arg = _HOST_TARGET_ARCH_TO_BAT_ARCH[host_target] + + # Get just version numbers + maj, min = msvc_version_to_maj_min(version) + # VS2015+ + if maj >= 14: + if env.get('MSVC_UWP_APP') == '1': + # Initialize environment variables with store/universal paths + arg += ' store' # Try to locate a batch file for this host/target platform combo try: diff --git a/src/engine/SCons/Tool/msvc.xml b/src/engine/SCons/Tool/msvc.xml index 2b4619e..1823a89 100644 --- a/src/engine/SCons/Tool/msvc.xml +++ b/src/engine/SCons/Tool/msvc.xml @@ -352,6 +352,8 @@ constructor; setting it later has no effect. <para> Valid values for Windows are +<literal>14.0</literal>, +<literal>14.0Exp</literal>, <literal>12.0</literal>, <literal>12.0Exp</literal>, <literal>11.0</literal>, @@ -440,4 +442,27 @@ For example, if you want to compile 64-bit binaries, you would set </summary> </cvar> +<cvar name="MSVC_UWP_APP"> +<summary> +<para> +Build libraries for a Universal Windows Platform (UWP) Application. +</para> + +<para> +If &cv-MSVC_UWP_APP; is set, the Visual Studio environment will be set up to point +to the Windows Store compatible libraries and Visual Studio runtimes. In doing so, +any libraries that are built will be able to be used in a UWP App and published +to the Windows Store. +This flag will only have an effect with Visual Studio 2015+. +This variable must be passed as an argument to the Environment() +constructor; setting it later has no effect. +</para> + +<para> +Valid values are '1' or '0' +</para> + +</summary> +</cvar> + </sconsdoc> |