From 586b2e5e3633db1e1749dc2bdd69f6240b714139 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 10 Aug 2015 14:06:09 -0400 Subject: [PATCH 1/2] Tests: Fix CMAKE_MAKE_PROGRAM selection in CMakeOnly tests Use the explicitly-tested make program, if any. --- Tests/CMakeOnly/Test.cmake.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/CMakeOnly/Test.cmake.in b/Tests/CMakeOnly/Test.cmake.in index 8d3258b9d..0ae8af158 100644 --- a/Tests/CMakeOnly/Test.cmake.in +++ b/Tests/CMakeOnly/Test.cmake.in @@ -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 ) From c180f0cbc224bf7f3fe9bcfdeea2d3c712c61084 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 10 Aug 2015 14:09:22 -0400 Subject: [PATCH 2/2] Tests: Fix CMAKE_MAKE_PROGRAM selection in FortranC.Flags test Use the explicitly-tested make program, if any. --- Tests/FortranC/Flags.cmake.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/FortranC/Flags.cmake.in b/Tests/FortranC/Flags.cmake.in index 2300fc61f..cf361a539 100644 --- a/Tests/FortranC/Flags.cmake.in +++ b/Tests/FortranC/Flags.cmake.in @@ -12,11 +12,17 @@ configure_file("${src}/test_opt.sh.in" "${bld}/fc.sh" @ONLY) set(ID) set(COMMAND) +set(make_program "@CMake_TEST_EXPLICIT_MAKE_PROGRAM@") +if(make_program) + set(maybe_make_program "-DCMAKE_MAKE_PROGRAM=${make_program}") +endif() + execute_process( WORKING_DIRECTORY "${bld}" COMMAND ${CMAKE_COMMAND} "${src}" -G "@CMAKE_GENERATOR@" -A "@CMAKE_GENERATOR_PLATFORM@" -T "@CMAKE_GENERATOR_TOOLSET@" + ${maybe_make_program} "-DFortranC_TEST_FLAGS=1" "-DCMAKE_C_COMPILER=${bld}/cc.sh" "-DCMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@"