summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_start
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/ctest_start')
-rw-r--r--Tests/RunCMake/ctest_start/CMakeLists.txt.in4
-rw-r--r--Tests/RunCMake/ctest_start/CTestConfig.cmake.in1
-rw-r--r--Tests/RunCMake/ctest_start/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/ctest_start/StartQuiet-stdout.txt1
-rw-r--r--Tests/RunCMake/ctest_start/test.cmake.in13
5 files changed, 29 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_start/CMakeLists.txt.in b/Tests/RunCMake/ctest_start/CMakeLists.txt.in
new file mode 100644
index 0000000..913239c
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/CMakeLists.txt.in
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 3.1)
+project(CTestStart@CASE_NAME@ NONE)
+include(CTest)
+add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
diff --git a/Tests/RunCMake/ctest_start/CTestConfig.cmake.in b/Tests/RunCMake/ctest_start/CTestConfig.cmake.in
new file mode 100644
index 0000000..e75d14f
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/CTestConfig.cmake.in
@@ -0,0 +1 @@
+set(CTEST_PROJECT_NAME "CTestStart@CASE_NAME@")
diff --git a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
new file mode 100644
index 0000000..f765a0f
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
@@ -0,0 +1,10 @@
+include(RunCTest)
+
+set(CASE_CTEST_START_ARGS "")
+
+function(run_ctest_start CASE_NAME)
+ set(CASE_CTEST_START_ARGS "${ARGN}")
+ run_ctest(${CASE_NAME})
+endfunction()
+
+run_ctest_start(StartQuiet Experimental QUIET)
diff --git a/Tests/RunCMake/ctest_start/StartQuiet-stdout.txt b/Tests/RunCMake/ctest_start/StartQuiet-stdout.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/StartQuiet-stdout.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/ctest_start/test.cmake.in b/Tests/RunCMake/ctest_start/test.cmake.in
new file mode 100644
index 0000000..21e3fad
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/test.cmake.in
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.1)
+
+set(CTEST_SITE "test-site")
+set(CTEST_BUILD_NAME "test-build-name")
+set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@")
+set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@-build")
+set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@")
+set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
+set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
+set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
+
+set(ctest_start_args "@CASE_CTEST_START_ARGS@")
+ctest_start(${ctest_start_args})