mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
VS12: Find proper MSBuild for VSProjectInSubdir test
If the CTest make program is not msbuild we find the msbuild corresponding to the current test generator. In the case of VS 12 search for the msbuild it provides.
This commit is contained in:
@@ -1541,9 +1541,14 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
|
||||
if(CMAKE_TEST_MAKEPROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]")
|
||||
set(MSBUILD_EXECUTABLE "${CMAKE_TEST_MAKEPROGRAM}")
|
||||
else()
|
||||
set(_FDIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkDir32]")
|
||||
set(_FVER "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkVer32]")
|
||||
find_program(MSBUILD_EXECUTABLE NAMES msbuild HINTS ${_FDIR}/${_FVER})
|
||||
if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio (12)")
|
||||
set(_msbuild_hints "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\${CMAKE_MATCH_1}.0;MSBuildToolsPath]")
|
||||
else()
|
||||
set(_FDIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkDir32]")
|
||||
set(_FVER "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkVer32]")
|
||||
set(_msbuild_hints ${_FDIR}/${_FVER})
|
||||
endif()
|
||||
find_program(MSBUILD_EXECUTABLE NAMES msbuild HINTS ${_msbuild_hints})
|
||||
endif()
|
||||
if(MSBUILD_EXECUTABLE)
|
||||
add_test(NAME VSProjectInSubdir COMMAND ${CMAKE_CTEST_COMMAND}
|
||||
|
||||
Reference in New Issue
Block a user