File tree Expand file tree Collapse file tree 10 files changed +92
-17
lines changed
Expand file tree Collapse file tree 10 files changed +92
-17
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,18 @@ cmake --build .
4949ctest -C Debug
5050```
5151
52+ ### Script to automatically build
53+
54+ Build, test, and package for:
55+
56+ - Cygwin;
57+ - MinGW (32-bit and 64-bit);
58+ - MSVC 2005 (32-bit and 64-bit);
59+ - MSVC 2022 (32-bit and 64-bit);
60+ - OpenWatcom's DOS target (16-bit).
61+
62+ …by running in Command Prompt: ` cmake\scripts\build_all.bat `
63+
5264#### Instructions for MSVC 2005
5365
5466With cmake-3.11.4 specified, do:
Original file line number Diff line number Diff line change 11@ echo on
2+
3+ call " %~dp0 \build_cygwin.bat"
4+ call " %~dp0 \build_mingw32.bat"
5+ call " %~dp0 \build_mingw64.bat"
26call " %~dp0 \build_msvc64_2005.bat"
3- call " %~dp0 \build_msvc86_2005.bat"
47call " %~dp0 \build_msvc64_2022.bat"
8+ call " %~dp0 \build_msvc86_2005.bat"
59call " %~dp0 \build_msvc86_2022.bat"
6- :: build_dos
7- :: build_mingw32
8- :: build_mingw64
9- :: build_cygwin
10+ call " %~dp0 \build_openwatcom_dos.bat"
Original file line number Diff line number Diff line change 1+ @ echo on
2+
3+ IF NOT DEFINED CYGWININSTALLDIR (
4+ set CYGWININSTALLDIR = " C:\usr\cygwin64"
5+ )
6+
7+ set build_dir = " build_cygwin"
8+ IF EXIST " %build_dir% " rd /s /q " %build_dir% "
9+ md " %build_dir% "
10+ cd " %build_dir% "
11+
12+ set pth = %CD:~2 ,99 %
13+ set pth = %pth:\ =/ %
14+ set drv = %CD:~0 ,1 %
15+ set " fullpath = /cygdrive/%drv%%pth% "
16+
17+ %CYGWININSTALLDIR% " \bin\bash" --login -c " cd '%fullpath% ' && cmake -DCMAKE_BUILD_TYPE='Debug' -DCMAKE_MAKE_PROGRAM=$(cygpath $(where ninja)) -G 'Ninja' .. && cmake --build . && ctest -C 'Debug' && cpack -G 'ZIP' -C 'Debug'"
18+ cd ..
Original file line number Diff line number Diff line change 1+ @ echo on
2+
3+ IF NOT DEFINED MINGW64INSTALLDIR (
4+ set MINGW64INSTALLDIR = " C:\usr\msys64"
5+ )
6+
7+ set build_dir = " build_mingw64"
8+ IF EXIST " %build_dir% " rd /s /q " %build_dir% "
9+ md " %build_dir% "
10+ cd " %build_dir% "
11+
12+ set pth = %CD:~2 ,99 %
13+ set pth = %pth:\ =/ %
14+ set drv = %CD:~0 ,1 %
15+ set " fullpath = /%drv%%pth% "
16+
17+ call %MINGW64INSTALLDIR% " \msys2_shell.cmd" -mingw64 -c " cd '%fullpath% ' && cmake -DCMAKE_BUILD_TYPE='Debug' .. && cmake --build . && ctest -C 'Debug' && cpack -G 'ZIP' -C 'Debug'"
18+ cd ..
Original file line number Diff line number Diff line change 1+ @ echo on
2+
3+ IF NOT DEFINED MINGW64INSTALLDIR (
4+ set MINGW64INSTALLDIR = " C:\usr\msys64"
5+ )
6+
7+ set build_dir = " build_mingw86"
8+ IF EXIST " %build_dir% " rd /s /q " %build_dir% "
9+ md " %build_dir% "
10+ cd " %build_dir% "
11+
12+ set pth = %CD:~2 ,99 %
13+ set pth = %pth:\ =/ %
14+ set drv = %CD:~0 ,1 %
15+ set " fullpath = /%drv%%pth% "
16+
17+ call %MINGW64INSTALLDIR% " \msys2_shell.cmd" -mingw32 -c " cd '%fullpath% ' && cmake -DCMAKE_BUILD_TYPE='Debug' .. && cmake --build . && ctest -C 'Debug' && cpack -G 'ZIP' -C 'Debug'"
18+ cd ..
Original file line number Diff line number Diff line change 33IF NOT DEFINED VSINSTALLDIR (
44 set VSINSTALLDIR = " C:\PROGRA~2\Microsoft Visual Studio 8"
55)
6- call " %VSINSTALLDIR% \ VC\vcvarsall.bat"
6+ call " C:\PROGRA~2\Microsoft Visual Studio 8\ VC\vcvarsall.bat" x64
77
88set build_dir = " build_msvc64_2005"
99IF EXIST " %build_dir% " rd /s /q " %build_dir% "
1010md " %build_dir% "
1111cd " %build_dir% "
12- cmake -DCMAKE_BUILD_TYPE=" Debug" -G " NMake Makefiles" .. && cmake --build . && ctest -C Debug
12+ cmake -DCMAKE_BUILD_TYPE=" Debug" -G " NMake Makefiles" .. && cmake --build . && ctest -C " Debug" && cpack -G " ZIP " -C " Debug " && ren *.zip *-msvc2005-win64.zip
1313cd ..
Original file line number Diff line number Diff line change 33IF NOT DEFINED VS2022INSTALLDIR (
44 set VS2022INSTALLDIR = " C:\PROGRA~1\Microsoft Visual Studio\2022\Enterprise"
55)
6-
7- IF EXIST " %VS2022INSTALLDIR% \VC\Auxiliary\Build\vcvarsall.bat" (
8- call " %VS2022INSTALLDIR% \VC\Auxiliary\Build\vcvars64.bat"
9- ) ELSE (
10- call " \VC\Auxiliary\Build\vcvars64.bat"
11- )
6+ call " %VS2022INSTALLDIR% \VC\Auxiliary\Build\vcvars64.bat"
127
138set build_dir = " build_msvc64_2022"
149IF EXIST " %build_dir% " rd /s /q " %build_dir% "
1510md " %build_dir% "
1611cd " %build_dir% "
17- cmake -DCMAKE_BUILD_TYPE=" Debug" -G " Visual Studio 17 2022" -A x64 .. && cmake --build . && ctest -C Debug
12+ cmake -DCMAKE_BUILD_TYPE=" Debug" -G " Visual Studio 17 2022" -A x64 .. && cmake --build . && ctest -C " Debug" && cpack -G " ZIP " -C " Debug " && ren *.zip *-msvc2022-win64.zip
1813cd ..
Original file line number Diff line number Diff line change 33IF NOT DEFINED VSINSTALLDIR (
44 set VSINSTALLDIR = " C:\PROGRA~2\Microsoft Visual Studio 8"
55)
6- call " %VSINSTALLDIR% \VC\vcvarsall.bat"
6+ call " C:\PROGRA~2\Microsoft Visual Studio 8 \VC\vcvarsall.bat"
77
88set build_dir = " build_msvc86_2005"
99IF EXIST " %build_dir% " rd /s /q " %build_dir% "
1010md " %build_dir% "
1111cd " %build_dir% "
12- cmake -DCMAKE_BUILD_TYPE=" Debug" -G " NMake Makefiles" .. && cmake --build . && ctest -C Debug
12+ cmake -DCMAKE_BUILD_TYPE=" Debug" -G " NMake Makefiles" .. && cmake --build . && ctest -C " Debug" && cpack -G " ZIP " -C " Debug " && ren *.zip *-msvc2005-win32.zip
1313cd ..
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ set build_dir="build_msvc86_2022"
99IF EXIST " %build_dir% " rd /s /q " %build_dir% "
1010md " %build_dir% "
1111cd " %build_dir% "
12- cmake -DCMAKE_BUILD_TYPE=" Debug" -G " Visual Studio 17 2022" -A x86 .. && cmake --build . && ctest -C Debug
12+ cmake -DCMAKE_BUILD_TYPE=" Debug" -G " Visual Studio 17 2022" -A " Win32 " .. && cmake --build . && ctest -C " Debug" && cpack -G " ZIP " -C " Debug " && ren *.zip *-msvc2022-win32.zip
1313cd ..
Original file line number Diff line number Diff line change 1+ @ echo on
2+
3+ IF NOT DEFINED WATCOMINSTALLDIR (
4+ set WATCOMINSTALLDIR = " C:\usr\WATCOM"
5+ )
6+ call " %WATCOMINSTALLDIR% \owsetenv.bat"
7+
8+ set build_dir = " build_dos"
9+ IF EXIST " %build_dir% " rd /s /q " %build_dir% "
10+ md " %build_dir% "
11+ cd " %build_dir% "
12+ cmake -DCMAKE_BUILD_TYPE=" Debug" -G " Watcom WMake" -DCMAKE_SYSTEM_NAME=" DOS" -DCMAKE_SYSTEM_PROCESSOR=" I86" .. && cmake --build . && cpack -G " ZIP" -C " Debug" -DCPACK_ARCHIVE_FILE_EXTENSION=" .zip"
13+ cd ..
You can’t perform that action at this time.
0 commit comments