-
Notifications
You must be signed in to change notification settings - Fork 36
/
.appveyor.ctest
36 lines (26 loc) · 1 KB
/
.appveyor.ctest
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
set(CTEST_SOURCE_DIRECTORY ".")
set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
SET(CONFIGURATION $ENV{CONFIGURATION})
set(GIT_COMMIT $ENV{APPVEYOR_REPO_COMMIT})
set(GIT_BRANCH $ENV{APPVEYOR_REPO_BRANCH})
string(SUBSTRING ${GIT_COMMIT} 0 7 COMMIT_ID)
set(CTEST_SITE "appveyor")
set(CTEST_BUILD_NAME "$ENV{APPVEYOR_BUILD_NUMBER}-${COMMIT_ID}-$ENV{PLATFORM}-${CONFIGURATION}")
configure_file(${CTEST_SOURCE_DIRECTORY}/.git.cfg.in ${CTEST_BINARY_DIRECTORY}/git.cfg)
set(CTEST_NOTES_FILES ${CTEST_BINARY_DIRECTORY}/git.cfg)
string(COMPARE EQUAL "$ENV{PLATFORM}" "x64" IS_64)
if(IS_64)
set(GEN_SUFFIX " Win64")
else()
set(GEN_SUFFIX "")
endif()
set(CTEST_CMAKE_GENERATOR "Visual Studio 12${GEN_SUFFIX}")
set(CTEST_BUILD_CONFIGURATION ${CONFIGURATION})
set(CTEST_CONFIGURATION_TYPE ${CONFIGURATION})
ctest_start(Continuous)
ctest_configure()
ctest_build()
ctest_test(RETURN_VALUE tests_ret)
if(NOT tests_ret EQUAL 0)
message(FATAL_ERROR "Test had failures!")
endif()