mirror of
https://github.com/reactos/CMake.git
synced 2024-12-20 18:48:14 +00:00
56ca8d4e63
Propagate CMAKE_GENERATOR_TOOLSET through the test hierarchy so that all tests can build with the selected generator toolset, if any.
19 lines
539 B
CMake
19 lines
539 B
CMake
if (NOT TEST_SOURCE)
|
|
set(TEST_SOURCE "${TEST}")
|
|
endif ()
|
|
|
|
set(source_dir "@CMAKE_CURRENT_SOURCE_DIR@/${TEST_SOURCE}")
|
|
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@"
|
|
-T "@CMAKE_TEST_GENERATOR_TOOLSET@"
|
|
WORKING_DIRECTORY "${binary_dir}"
|
|
RESULT_VARIABLE result
|
|
)
|
|
if(result)
|
|
message(FATAL_ERROR "CMake failed to configure ${TEST}")
|
|
endif()
|