Tests: Fix standalone build of tests with nested projects

Since commit fd6076d0 (Tests: Pass CMAKE_MAKE_PROGRAM instead of
--build-makeprogram, 2013-11-15) the ExportImport, Fortran, and
MacRuntimePath tests use the value of CMAKE_TEST_MAKEPROGRAM as the
CMAKE_MAKE_PROGRAM for their nested projects configurations.
Teach these tests to initialize CMAKE_TEST_MAKEPROGRAM when it is
not provided, such as when building the tests manually.
This commit is contained in:
Brad King 2013-12-05 12:44:32 -05:00
parent e4201248ce
commit ef7c11ee31
3 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,8 @@
cmake_minimum_required (VERSION 2.7.20090711)
project(ExportImport C CXX)
if(NOT DEFINED CMAKE_TEST_MAKEPROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}")
endif()
# Wipe out the install tree to make sure the exporter works.
add_custom_command(

View File

@ -1,5 +1,9 @@
cmake_minimum_required (VERSION 2.6)
project(testf C CXX Fortran)
if(NOT DEFINED CMAKE_TEST_MAKEPROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}")
endif()
message("CTEST_FULL_OUTPUT ")
set(CMAKE_VERBOSE_MAKEFILE 1)
message("ENV_FLAGS = $ENV{FFLAGS}")

View File

@ -1,6 +1,8 @@
cmake_minimum_required (VERSION 2.8)
project(MacRuntimePath)
if(NOT DEFINED CMAKE_TEST_MAKEPROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}")
endif()
# Wipe out the install tree to make sure the exporter works.
add_custom_command(