2012-10-24 21:55:14 +04:00
|
|
|
if (NOT TEST_SOURCE)
|
|
|
|
set(TEST_SOURCE "${TEST}")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
set(source_dir "@CMAKE_CURRENT_SOURCE_DIR@/${TEST_SOURCE}")
|
2012-01-12 02:04:04 +04:00
|
|
|
set(binary_dir "@CMAKE_CURRENT_BINARY_DIR@/${TEST}-build")
|
|
|
|
file(REMOVE_RECURSE "${binary_dir}")
|
|
|
|
file(MAKE_DIRECTORY "${binary_dir}")
|
|
|
|
execute_process(
|
2012-02-17 21:41:39 +04:00
|
|
|
COMMAND ${CMAKE_COMMAND} ${CMAKE_ARGS}
|
2014-03-03 23:06:34 +04:00
|
|
|
"${source_dir}" -G "@CMAKE_GENERATOR@"
|
2014-09-12 18:38:32 +04:00
|
|
|
-A "@CMAKE_GENERATOR_PLATFORM@"
|
2014-03-03 23:06:34 +04:00
|
|
|
-T "@CMAKE_GENERATOR_TOOLSET@"
|
2012-01-12 02:04:04 +04:00
|
|
|
WORKING_DIRECTORY "${binary_dir}"
|
|
|
|
RESULT_VARIABLE result
|
|
|
|
)
|
|
|
|
if(result)
|
|
|
|
message(FATAL_ERROR "CMake failed to configure ${TEST}")
|
|
|
|
endif()
|