-
Notifications
You must be signed in to change notification settings - Fork 1
/
createNinja64_vs12.bat
86 lines (71 loc) · 2.74 KB
/
createNinja64_vs12.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@echo off
Setlocal EnableDelayedExpansion
SET BASE_DIR=%~dp0
SET NINJA=ninja -j 1
SET VS_VERSION=12
SET VS_PREFIX=vs%VS_VERSION%
SET VS=%ProgramFiles(x86)%\Microsoft Visual Studio %VS_VERSION%.0\VC
SET VSDIR=%VS%\bin\amd64
call "%VS%\vcvarsall.bat" amd64
SET NINJA_OPTS=-DCMAKE_CXX_COMPILER:FILEPATH="%VSDIR%\cl.exe" -DCMAKE_C_COMPILER:FILEPATH="%VSDIR%\cl.exe" -DCMAKE_LINKER:FILEPATH="%VSDIR%\link.exe"
if not exist %BASE_DIR%\dist mkdir %BASE_DIR%\dist
::
:: Build release static runtime version
::
SET WITH_STATIC_RUNTIME=ON
SET CMAKE_BUILD_TYPE=Release
SET VARIANT=%VS_PREFIX%_release_x64_static
SET CMAKE_OPTS=-DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE% -DBUILD_SHARED_LIBS:BOOL=OFF -DWITH_STATIC_RUNTIME:BOOL=%WITH_STATIC_RUNTIME% -DCMAKE_INSTALL_PREFIX=%BASE_DIR%\install_%VARIANT%
mkdir %BASE_DIR%\%VARIANT%
pushd %BASE_DIR%\%VARIANT%
cmake -G "Ninja" %NINJA_OPTS% %CMAKE_OPTS% %* %BASE_DIR%
%NINJA%
%NINJA% install
cpack -G ZIP
move "libSBML Dependencies-1.0.0-b1-win64.zip" %BASE_DIR%\dist\libSBML_dependencies_%VARIANT%.zip
popd
::
:: Build release dynamic runtime version
::
SET WITH_STATIC_RUNTIME=OFF
SET CMAKE_BUILD_TYPE=Release
SET VARIANT=%VS_PREFIX%_release_x64
SET CMAKE_OPTS=-DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE% -DBUILD_SHARED_LIBS:BOOL=OFF -DWITH_STATIC_RUNTIME:BOOL=%WITH_STATIC_RUNTIME% -DCMAKE_INSTALL_PREFIX=%BASE_DIR%\install_%VARIANT%
mkdir %BASE_DIR%\%VARIANT%
pushd %BASE_DIR%\%VARIANT%
cmake -G "Ninja" %NINJA_OPTS% %CMAKE_OPTS% %* %BASE_DIR%
%NINJA%
%NINJA% install
cpack -G ZIP
move "libSBML Dependencies-1.0.0-b1-win64.zip" %BASE_DIR%\dist\libSBML_dependencies_%VARIANT%.zip
popd
::
:: Build debug static runtime version
::
SET WITH_STATIC_RUNTIME=ON
SET CMAKE_BUILD_TYPE=Debug
SET VARIANT=%VS_PREFIX%_debug_x64_static
SET CMAKE_OPTS=-DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE% -DBUILD_SHARED_LIBS:BOOL=OFF -DWITH_STATIC_RUNTIME:BOOL=%WITH_STATIC_RUNTIME% -DCMAKE_INSTALL_PREFIX=%BASE_DIR%\install_%VARIANT%
mkdir %BASE_DIR%\%VARIANT%
pushd %BASE_DIR%\%VARIANT%
cmake -G "Ninja" %NINJA_OPTS% %CMAKE_OPTS% %* %BASE_DIR%
%NINJA%
%NINJA% install
cpack -G ZIP
move "libSBML Dependencies-1.0.0-b1-win64.zip" %BASE_DIR%\dist\libSBML_dependencies_%VARIANT%.zip
popd
::
:: Build debug dynamic runtime version
::
SET WITH_STATIC_RUNTIME=OFF
SET CMAKE_BUILD_TYPE=Debug
SET VARIANT=%VS_PREFIX%_debug_x64
SET CMAKE_OPTS=-DCMAKE_BUILD_TYPE:STRING=%CMAKE_BUILD_TYPE% -DBUILD_SHARED_LIBS:BOOL=OFF -DWITH_STATIC_RUNTIME:BOOL=%WITH_STATIC_RUNTIME% -DCMAKE_INSTALL_PREFIX=%BASE_DIR%\install_%VARIANT%
mkdir %BASE_DIR%\%VARIANT%
pushd %BASE_DIR%\%VARIANT%
cmake -G "Ninja" %NINJA_OPTS% %CMAKE_OPTS% %* %BASE_DIR%
%NINJA%
%NINJA% install
cpack -G ZIP
move "libSBML Dependencies-1.0.0-b1-win64.zip" %BASE_DIR%\dist\libSBML_dependencies_%VARIANT%.zip
popd