Skip to content

Commit 3956e71

Browse files
committed
fix config
1 parent 13012a1 commit 3956e71

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dist/win32/build.cmd

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ set do_build=1
1818
set support_test=1
1919
set do_test=
2020
set msvc=1
21+
set config=
2122

2223
:parse_param
2324

@@ -35,14 +36,17 @@ if %1 == --help (
3536
)
3637
if %1 == Debug (
3738
set cmake_opts=%cmake_opts% -DCMAKE_BUILD_TYPE=%1
39+
set config=--config %1
3840
goto next_param
3941
)
4042
if %1 == RelWithDebInfo (
4143
set cmake_opts=%cmake_opts% -DCMAKE_BUILD_TYPE=%1
44+
set config=--config %1
4245
goto next_param
4346
)
4447
if %1 == Release (
4548
set cmake_opts=%cmake_opts% -DCMAKE_BUILD_TYPE=%1
49+
set config=--config %1
4650
goto next_param
4751
)
4852
if %1 == msvc (
@@ -201,18 +205,18 @@ if errorlevel 1 goto error
201205

202206
if not "%do_build%" == "1" goto done
203207

204-
cmake --build . %par%
208+
cmake --build . %config% %par%
205209
if errorlevel 1 goto error
206-
cmake --build . --target install %par%
210+
cmake --build . %config% --target install %par%
207211
if errorlevel 1 goto error
208212

209213
if not "%do_test%" == "1" goto done
210214
set CTEST_OUTPUT_ON_FAILURE=1
211215
if %msvc% == 1 (
212-
cmake --build . --target RUN_TESTS
216+
cmake --build . %config% --target RUN_TESTS
213217
if errorlevel 1 goto error
214218
) else (
215-
cmake --build . --target test
219+
cmake --build . %config% --target test
216220
if errorlevel 1 goto error
217221
)
218222

0 commit comments

Comments
 (0)