@@ -15,6 +15,7 @@ if /i "%1"=="/?" goto help
15
15
set config = Release
16
16
set target = Build
17
17
set target_arch = x86
18
+ set target_env =
18
19
set noprojgen =
19
20
set nobuild =
20
21
set nosign =
@@ -44,6 +45,8 @@ if /i "%1"=="clean" set target=Clean&goto arg-ok
44
45
if /i " %1 " == " ia32" set target_arch = x86& goto arg-ok
45
46
if /i " %1 " == " x86" set target_arch = x86& goto arg-ok
46
47
if /i " %1 " == " x64" set target_arch = x64& goto arg-ok
48
+ if /i " %1 " == " vc2013" set target_env = vc2013& goto arg-ok
49
+ if /i " %1 " == " vc2015" set target_env = vc2015& goto arg-ok
47
50
if /i " %1 " == " noprojgen" set noprojgen = 1& goto arg-ok
48
51
if /i " %1 " == " nobuild" set nobuild = 1& goto arg-ok
49
52
if /i " %1 " == " nosign" set nosign = 1& goto arg-ok
@@ -110,6 +113,7 @@ call :getnodeversion || exit /b 1
110
113
111
114
@ rem Set environment for msbuild
112
115
116
+ if defined target_env if " %target_env% " NEQ " vc2015" goto vc-set-2013
113
117
@ rem Look for Visual Studio 2015
114
118
echo Looking for Visual Studio 2015
115
119
if not defined VS140COMNTOOLS goto vc-set-2013
@@ -133,6 +137,7 @@ set PLATFORM_TOOLSET=v140
133
137
goto msbuild-found
134
138
135
139
:vc-set-2013
140
+ if defined target_env if " %target_env% " NEQ " vc2013" goto msbuild-not-found
136
141
@ rem Look for Visual Studio 2013
137
142
echo Looking for Visual Studio 2013
138
143
if not defined VS120COMNTOOLS goto msbuild-not-found
@@ -262,7 +267,7 @@ echo Failed to create vc project files.
262
267
goto exit
263
268
264
269
:help
265
- echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [small-icu/full-icu/intl-none] [nobuild] [nosign] [x86/x64] [download-all] [enable-vtune]
270
+ echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [small-icu/full-icu/intl-none] [nobuild] [nosign] [x86/x64] [vc2013/vc2015] [ download-all] [enable-vtune]
266
271
echo Examples:
267
272
echo vcbuild.bat : builds release build
268
273
echo vcbuild.bat debug : builds debug build
0 commit comments