summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeOnly/Test.cmake.in
blob: aa2d09374f6e905b41795dc15e4ca8394fa2196a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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} "${source_dir}" -G "@CMAKE_TEST_GENERATOR@"
  WORKING_DIRECTORY "${binary_dir}"
  RESULT_VARIABLE result
  )
if(result)
  message(FATAL_ERROR "CMake failed to configure ${TEST}")
endif()