summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-12 13:30:36 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-08-12 13:30:36 (GMT)
commitce254de60e32dd1be95b430d37dc9bb67911d158 (patch)
tree518afe4385976b71a822b2854aa5bb95f8a2fcc0 /Tests
parente6883772ff661017f927633ec863fa4a671c27a5 (diff)
parentc180f0cbc224bf7f3fe9bcfdeea2d3c712c61084 (diff)
downloadCMake-ce254de60e32dd1be95b430d37dc9bb67911d158.zip
CMake-ce254de60e32dd1be95b430d37dc9bb67911d158.tar.gz
CMake-ce254de60e32dd1be95b430d37dc9bb67911d158.tar.bz2
Merge topic 'tests-use-CMAKE_MAKE_PROGRAM'
c180f0cb Tests: Fix CMAKE_MAKE_PROGRAM selection in FortranC.Flags test 586b2e5e Tests: Fix CMAKE_MAKE_PROGRAM selection in CMakeOnly tests
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/Test.cmake.in6
-rw-r--r--Tests/FortranC/Flags.cmake.in6
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/Test.cmake.in b/Tests/CMakeOnly/Test.cmake.in
index 8d3258b..0ae8af1 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
)
diff --git a/Tests/FortranC/Flags.cmake.in b/Tests/FortranC/Flags.cmake.in
index 2300fc6..cf361a5 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@"