Tests: Do not use an explicit make program for VS generators

Do not pass the CMAKE_MAKE_PROGRAM cache entry to tests when using the
VS generators.  Allow them to pick the correct build tool automatically.
This commit is contained in:
Brad King 2013-11-15 09:15:33 -05:00
parent 72dd738bd4
commit 5229f2df63
1 changed files with 5 additions and 1 deletions

View File

@ -47,7 +47,11 @@ configure_file(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in
if(BUILD_TESTING) if(BUILD_TESTING)
set(CMAKE_TEST_DEVENV "") set(CMAKE_TEST_DEVENV "")
if(NOT CMAKE_TEST_DIFFERENT_GENERATOR) if(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}") if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio")
set(CMAKE_TEST_MAKEPROGRAM "")
else()
set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}")
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}")