summaryrefslogtreecommitdiff
path: root/Tests/CMakeOnly/Test.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeOnly/Test.cmake.in')
-rw-r--r--Tests/CMakeOnly/Test.cmake.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/Test.cmake.in b/Tests/CMakeOnly/Test.cmake.in
new file mode 100644
index 000000000..42af06891
--- /dev/null
+++ b/Tests/CMakeOnly/Test.cmake.in
@@ -0,0 +1,13 @@
+set(source_dir "@CMAKE_CURRENT_SOURCE_DIR@/${TEST}")
+set(binary_dir "@CMAKE_CURRENT_BINARY_DIR@/${TEST}-build")
+file(REMOVE_RECURSE "${binary_dir}")
+file(MAKE_DIRECTORY "${binary_dir}")
+execute_process(
+ COMMAND ${CMAKE_COMMAND} ${CMAKE_ARGS}
+ "${source_dir}" -G "@CMAKE_TEST_GENERATOR@"
+ WORKING_DIRECTORY "${binary_dir}"
+ RESULT_VARIABLE result
+ )
+if(result)
+ message(FATAL_ERROR "CMake failed to configure ${TEST}")
+endif()