Tests: Fix CMAKE_MAKE_PROGRAM selection in FortranC.Flags test

Use the explicitly-tested make program, if any.
This commit is contained in:
Brad King 2015-08-10 14:09:22 -04:00
parent 586b2e5e36
commit c180f0cbc2
1 changed files with 6 additions and 0 deletions

View File

@ -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@"