This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
make.cmd
82 lines (68 loc) · 1.55 KB
/
make.cmd
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
@Echo Off
If "%~1" == "" (
Goto :Usage
) Else If Not "%~1" == "MSVC" (
If Not "%~1" == "MINGW" (
Goto :Usage
)
)
If "%~2" == "" (
Goto :Usage
) Else If Not "%~2" == "Debug" (
If Not "%~2" == "Release" (
Goto :Usage
)
)
If "%~3" == "" (
Goto :Usage
) Else If Not "%~3" == "x86" (
If Not "%~3" == "x64" (
Goto :Usage
)
)
If "%~4" == "" (
Goto :Usage
) Else If Not "%~4" == "package" (
If Not "%~4" == "install" (
Goto :Usage
)
)
If "%~1" == "MSVC" (
Set "BUILDTYPE=msvc"
Set "CMAKE_GENERATOR=Visual Studio 15 2017 Win64"
If "%~3" == "x86" (
Set "CMAKE_GENERATOR=Visual Studio 15 2017"
)
)
If "%~1" == "MINGW" (
Set "BUILDTYPE=mingw"
Set "CMAKE_GENERATOR=MinGW Makefiles"
)
If "%~2" == "Debug" (
Set "BUILDCONFIG=debug"
Set "CMAKE_BUILD=Debug"
)
If "%~2" == "Release" (
Set "BUILDCONFIG=release"
Set "CMAKE_BUILD=RelWithDebInfo"
)
Set TARGET=%~4
Set SEABOLTDIR=%~dp0
Set BUILDDIR=%SEABOLTDIR%\build-%BUILDTYPE%-%BUILDCONFIG%
Mkdir %BUILDDIR%
Pushd %BUILDDIR%
cmake.exe -G "%CMAKE_GENERATOR%" -DCMAKE_CONFIGURATION_TYPES=%CMAKE_BUILD% -DCMAKE_BUILD_TYPE=%CMAKE_BUILD% -DCMAKE_INSTALL_PREFIX=dist .. || Goto :Failure
cmake.exe --build . --target %TARGET% --config %CMAKE_BUILD% || Goto :Failure
Popd
Exit /b 0
:Usage
@Echo "Usage: %~n0 (MSVC|MINGW) (Debug|Release) (x86|x64) (install|package)"
Goto :Failure
:Failure
If "%NEO4J_CHILD_SCRIPT%" == "" (
If Not "%TEAMCITY_PROJECT_NAME%" == "" (
ECHO ##teamcity[buildStatus status='FAILURE' text='compilation failed']
)
)
popd.exe
Exit /b 1