summaryrefslogtreecommitdiffstats
path: root/Tests/CTestTestLaunchers/test.cmake.in
blob: 03a118a406be9ff60147af3c84a9c146ce4bbe01 (plain)
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
cmake_minimum_required(VERSION 2.8.12)

# Settings:
set(CTEST_DASHBOARD_SOURCE              "@CMake_SOURCE_DIR@/Tests/CTestTestLaunchers")
set(CTEST_DASHBOARD_ROOT                "@CMake_BINARY_DIR@/Tests/CTestTestLaunchers")
set(CTEST_SITE                          "@SITE@")
set(CTEST_BUILD_NAME                    "Launchers-@BUILDNAME@-CTestTestLaunchers")

set(CTEST_SOURCE_DIRECTORY              "${CTEST_DASHBOARD_SOURCE}/launcher_test_project")
set(CTEST_BINARY_DIRECTORY              "${CTEST_DASHBOARD_ROOT}/launcher_test_project-bin")
set(CTEST_CMAKE_GENERATOR               "@CMAKE_GENERATOR@")
set(CTEST_CMAKE_GENERATOR_PLATFORM      "@CMAKE_GENERATOR_PLATFORM@")
set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_GENERATOR_TOOLSET@")
set(CTEST_BUILD_CONFIGURATION           "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_NOTES_FILES                   "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")

ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})

file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@
CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@
CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@
CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@
CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@
CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@
")

set(TEST_SUCCESS FALSE)

ctest_start(Experimental)
ctest_configure(OPTIONS "-DCTEST_USE_LAUNCHERS=1")
ctest_build(NUMBER_ERRORS error_count)

if("${error_count}" STREQUAL "1")
  set(TEST_SUCCESS TRUE)
endif()

if(TEST_SUCCESS)
  message("CTEST_TEST_LAUNCHER_SUCCESS")
endif()