Tests: Drop CMAKE_TEST_GENERATOR and CMAKE_TEST_MAKEPROGRAM options

Drop the option to test with a different generator and make program than
was used to build.  This was used only to test support for the Open
Watcom compiler which at one time could not build CMake.  Instead we
will allow CMake to be configured to skip building binaries and just run
the test suite using an external CMake (in a future change).

For now leave the two option variables hard-coded to the old option
defaults until code can be updated to stop using them.
This commit is contained in:
Brad King 2014-03-03 12:39:10 -05:00
parent e509631237
commit daf0a5fede
2 changed files with 10 additions and 21 deletions

View File

@ -114,17 +114,8 @@ endif()
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
macro(CMAKE_SETUP_TESTING) macro(CMAKE_SETUP_TESTING)
if(BUILD_TESTING) if(BUILD_TESTING)
set(CMAKE_TEST_GENERATOR "" CACHE STRING set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
"Generator used when running tests") set(CMAKE_TEST_GENERATOR_TOOLSET "${CMAKE_GENERATOR_TOOLSET}")
set(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH
"Generator used when running tests")
if(NOT CMAKE_TEST_GENERATOR)
set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
set(CMAKE_TEST_GENERATOR_TOOLSET "${CMAKE_GENERATOR_TOOLSET}")
else()
set(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
set(CMAKE_TEST_GENERATOR_TOOLSET "")
endif()
# Are we testing with the MSVC compiler? # Are we testing with the MSVC compiler?
set(CMAKE_TEST_MSVC 0) set(CMAKE_TEST_MSVC 0)

View File

@ -46,16 +46,14 @@ configure_file(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in
# Testing # Testing
if(BUILD_TESTING) if(BUILD_TESTING)
set(CMAKE_TEST_DEVENV "") set(CMAKE_TEST_DEVENV "")
if(NOT CMAKE_TEST_DIFFERENT_GENERATOR) if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio")
if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio") set(CMAKE_TEST_MAKEPROGRAM "")
set(CMAKE_TEST_MAKEPROGRAM "") else()
else() set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}")
set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}") endif()
endif() if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio [7-9] " AND
if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio [7-9] " AND NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]")
NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]") set(CMAKE_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}")
set(CMAKE_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}")
endif()
endif() endif()
if("${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles" OR ("${CMAKE_TEST_GENERATOR}" MATCHES Ninja AND NOT WIN32)) if("${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles" OR ("${CMAKE_TEST_GENERATOR}" MATCHES Ninja AND NOT WIN32))