Skip to content

Commit f43ec93

Browse files
bugfix of releasetest.bat
1 parent ddc43f9 commit f43ec93

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

tools/test/releasetest/releasetest.bat

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,41 @@ if "%QMAKE%" == "" (
3939
exit /B 1
4040
)
4141

42+
:: cmake options
43+
devenv /? | find "Visual Studio 2022" >NUL
44+
if not ERRORLEVEL 1 (
45+
set VSVER=2022
46+
if /i "%Platform%" == "x64" (
47+
set CMAKEOPT=-G"Visual Studio 17 2022" -A x64
48+
) else (
49+
set CMAKEOPT=-G"Visual Studio 17 2022" -A Win32
50+
)
51+
goto :step1
52+
)
53+
54+
devenv /? | find "Visual Studio 2019" >NUL
55+
if not ERRORLEVEL 1 (
56+
set VSVER=2019
57+
if /i "%Platform%" == "x64" (
58+
set CMAKEOPT=-G"Visual Studio 16 2019" -A x64
59+
) else (
60+
set CMAKEOPT=-G"Visual Studio 16 2019" -A Win32
61+
)
62+
goto :step1
63+
)
64+
65+
devenv /? | find "Visual Studio 2017" >NUL
66+
if not ERRORLEVEL 1 (
67+
set VSVER=2017
68+
if /i "%Platform%" == "x64" (
69+
set CMAKEOPT=-G"Visual Studio 15 2017 Win64"
70+
) else (
71+
set CMAKEOPT=-G"Visual Studio 15 2017"
72+
)
73+
goto :step1
74+
)
4275

76+
:step1
4377
cd /D %BASEDIR%
4478
rd /Q /S %APPNAME%
4579
tspawn new %APPNAME%
@@ -97,7 +131,7 @@ cd /D %APPDIR%
97131
if exist build rd /Q /S build
98132
del /Q /F lib\*.*
99133
cmake --version
100-
cmake -S . -B build -DCMAKE_BUILD_TYPE=%1
134+
cmake %CMAKEOPT% -S . -B build -DCMAKE_BUILD_TYPE=%1
101135
if ERRORLEVEL 1 (
102136
echo;
103137
echo CMake Error!

tools/tspawn/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ static void printSuccessMessage(const QString &model)
506506
msg += "\n or\n\ncmake:\n";
507507
msg += " Run `cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug` to generate Makefile for debug mode.\n";
508508
msg += " Run `cmake -S . -B build -DCMAKE_BUILD_TYPE=Release` to generate Makefile for release mode.\n";
509-
msg += " Run `cd build; make cmake` to regenerate Makefile.";
509+
msg += " Run `cmake --build build --target cmake` to regenerate Makefile.";
510510
}
511511

512512
putchar('\n');

0 commit comments

Comments
 (0)