From dca8800cb51eec7bda18fb47d3be76c18ff264c8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 3 Dec 2020 10:21:56 -0500 Subject: 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 --- Tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v0.12