Tests: Fix CMAKE_MAKE_PROGRAM selection in CMakeOnly tests
Use the explicitly-tested make program, if any.
This commit is contained in:
parent
422d3f68de
commit
586b2e5e36
|
@ -2,6 +2,11 @@ if (NOT TEST_SOURCE)
|
|||
set(TEST_SOURCE "${TEST}")
|
||||
endif ()
|
||||
|
||||
set(make_program "@CMake_TEST_EXPLICIT_MAKE_PROGRAM@")
|
||||
if(make_program)
|
||||
set(maybe_make_program "-DCMAKE_MAKE_PROGRAM=${make_program}")
|
||||
endif()
|
||||
|
||||
set(source_dir "@CMAKE_CURRENT_SOURCE_DIR@/${TEST_SOURCE}")
|
||||
set(binary_dir "@CMAKE_CURRENT_BINARY_DIR@/${TEST}-build")
|
||||
file(REMOVE_RECURSE "${binary_dir}")
|
||||
|
@ -11,6 +16,7 @@ execute_process(
|
|||
"${source_dir}" -G "@CMAKE_GENERATOR@"
|
||||
-A "@CMAKE_GENERATOR_PLATFORM@"
|
||||
-T "@CMAKE_GENERATOR_TOOLSET@"
|
||||
${maybe_make_program}
|
||||
WORKING_DIRECTORY "${binary_dir}"
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue