Tests: Enable devenv tests on VS >= 10

The VSExcludeFromDefaultBuild have not been enabled on VS >= 10 since
commit v3.0.0-rc1~260^2~9 (Tests: Simplify VSExcludeFromDefaultBuild
configuration, 2013-11-14).  Since commit v3.0.0-rc1~260^2~2 (VS: Add
CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variables, 2013-12-04) we can
simply check the CMAKE_VS_DEVENV_COMMAND variable for a devenv tool
to use for the test.
This commit is contained in:
Brad King 2015-05-04 16:03:43 -04:00
parent d3b36a90b6
commit 562e69dd50
1 changed files with 3 additions and 1 deletions

View File

@ -46,7 +46,9 @@ configure_file(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in
# Testing
if(BUILD_TESTING)
set(CMake_TEST_DEVENV "")
if(CMAKE_GENERATOR MATCHES "Visual Studio [7-9] " AND
if(CMAKE_VS_DEVENV_COMMAND)
set(CMake_TEST_DEVENV "${CMAKE_VS_DEVENV_COMMAND}")
elseif(CMAKE_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()