summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-03 15:21:56 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-03 15:21:56 (GMT)
commitdca8800cb51eec7bda18fb47d3be76c18ff264c8 (patch)
tree7365d9738438cadd6f9bfe5a6c7117ae97bceea1 /Tests
parent6cf88734a5545f44d0bba4017ab4dbeebbe5b76b (diff)
downloadCMake-dca8800cb51eec7bda18fb47d3be76c18ff264c8.zip
CMake-dca8800cb51eec7bda18fb47d3be76c18ff264c8.tar.gz
CMake-dca8800cb51eec7bda18fb47d3be76c18ff264c8.tar.bz2
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
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 10406e3..4938681 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -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)