summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt13
-rw-r--r--Tests/CMakeLists.txt18
2 files changed, 10 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e1e7c344a..4c2c20b735 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -114,17 +114,8 @@ endif()
#-----------------------------------------------------------------------
macro(CMAKE_SETUP_TESTING)
if(BUILD_TESTING)
- set(CMAKE_TEST_GENERATOR "" CACHE STRING
- "Generator used when running tests")
- 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()
+ set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
+ set(CMAKE_TEST_GENERATOR_TOOLSET "${CMAKE_GENERATOR_TOOLSET}")
# Are we testing with the MSVC compiler?
set(CMAKE_TEST_MSVC 0)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 6cf5814cd7..fa98a2b59a 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -46,16 +46,14 @@ configure_file(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in
# Testing
if(BUILD_TESTING)
set(CMAKE_TEST_DEVENV "")
- if(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
- 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
- NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]")
- set(CMAKE_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}")
- endif()
+ 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
+ NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]")
+ set(CMAKE_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}")
endif()
if("${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles" OR ("${CMAKE_TEST_GENERATOR}" MATCHES Ninja AND NOT WIN32))