You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
762 B
11 lines
762 B
if(NOT DEFINED RunCMake_TEST_SUITE)
|
|
message("Usage: ${CMAKE_COMMAND} -DRunCMake_TEST_SUITE=<test name> -P Tests/RunCMake/AddRunCMakeTestSuite.cmake")
|
|
else()
|
|
include("Source/CMakeVersion.cmake")
|
|
set(RunCMake_TEST_DIR "Tests/RunCMake/${RunCMake_TEST_SUITE}")
|
|
file(MAKE_DIRECTORY "${RunCMake_TEST_DIR}")
|
|
file(WRITE "${RunCMake_TEST_DIR}/CMakeLists.txt" "cmake_minimum_required(VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR})\nproject(\${RunCMake_TEST} NONE)\ninclude(\${RunCMake_TEST}.cmake)\n")
|
|
file(WRITE "${RunCMake_TEST_DIR}/RunCMakeTest.cmake" "include(RunCMake)\n\n# Write your test cases below, like so:\n#\n# run_cmake(TestCaseName)\n")
|
|
file(APPEND "Tests/RunCMake/CMakeLists.txt" "add_RunCMake_test(${RunCMake_TEST_SUITE})\n")
|
|
endif()
|