Tests: Drop CMAKE_TEST_MAKEPROGRAM variable

Remaining uses of the variable simply test its value so use
CMAKE_MAKE_PROGRAM directly instead.
This commit is contained in:
Brad King 2014-03-03 13:58:37 -05:00
parent a8a9fb7edd
commit 76477267bd
1 changed files with 5 additions and 6 deletions

View File

@ -51,7 +51,6 @@ if(BUILD_TESTING)
set(CMake_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}") set(CMake_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}")
endif() endif()
set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}")
if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio") if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio")
set(CMake_TEST_EXPLICIT_MAKE_PROGRAM "") set(CMake_TEST_EXPLICIT_MAKE_PROGRAM "")
else() else()
@ -63,8 +62,8 @@ if(BUILD_TESTING)
endif() endif()
set(MAKE_IS_GNU ) set(MAKE_IS_GNU )
if(CMAKE_TEST_MAKEPROGRAM MATCHES make) if(CMAKE_MAKE_PROGRAM MATCHES make)
execute_process(COMMAND ${CMAKE_TEST_MAKEPROGRAM} no_such_target --version execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} no_such_target --version
RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE out) RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE out)
if("${res}" STREQUAL "0") if("${res}" STREQUAL "0")
if("${out}" MATCHES "GNU") if("${out}" MATCHES "GNU")
@ -75,7 +74,7 @@ if(BUILD_TESTING)
# some old versions of make simply cannot handle spaces in paths # some old versions of make simply cannot handle spaces in paths
if (MAKE_IS_GNU OR if (MAKE_IS_GNU OR
CMAKE_TEST_MAKEPROGRAM MATCHES "nmake|gmake|wmake" OR CMAKE_MAKE_PROGRAM MATCHES "nmake|gmake|wmake" OR
CMAKE_TEST_GENERATOR MATCHES "Visual Studio|XCode|Borland") CMAKE_TEST_GENERATOR MATCHES "Visual Studio|XCode|Borland")
set(MAKE_SUPPORTS_SPACES 1) set(MAKE_SUPPORTS_SPACES 1)
else() else()
@ -1533,10 +1532,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
# Look for evidence that this is a VCExpress build. If so, avoid # Look for evidence that this is a VCExpress build. If so, avoid
# the MFC test by default. # the MFC test by default.
string(TOLOWER "${CMAKE_MAKE_PROGRAM};${CMAKE_TEST_MAKEPROGRAM}" mkprog) string(TOLOWER "${CMAKE_MAKE_PROGRAM}" mkprog)
if(mkprog MATCHES "vcexpress") if(mkprog MATCHES "vcexpress")
message(STATUS message(STATUS
"CMAKE_TEST_MAKEPROGRAM indicates vcexpress, avoiding MFC test") "CMAKE_MAKE_PROGRAM indicates vcexpress, avoiding MFC test")
set(CTEST_RUN_MFC OFF) set(CTEST_RUN_MFC OFF)
endif() endif()