mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
Tests: Look for Visual Studio only on Windows hosts
Update logic added by commit 6051a49c78 (Visual Studio: Add Android
support, 2020-06-12, v3.19.0-rc1~619^2) to only look for VS
installations using `cmake_host_system_information` on Windows hosts.
Otherwise the `VS_*_DIR` keys are not available.
Fixes: #21547
This commit is contained in:
@@ -206,7 +206,7 @@ if(BUILD_TESTING)
|
||||
set(${reg} 0)
|
||||
endif()
|
||||
endforeach()
|
||||
if(COMMAND cmake_host_system_information)
|
||||
if(CMAKE_HOST_WIN32 AND COMMAND cmake_host_system_information)
|
||||
set(info_vs15 "VS_15_DIR")
|
||||
set(info_vs16 "VS_16_DIR")
|
||||
set(vs_versions)
|
||||
|
||||
Reference in New Issue
Block a user