summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-21 16:17:37 (GMT)
committerBrad King <brad.king@kitware.com>2021-10-29 15:52:58 (GMT)
commit195d47e2139171cbae18a7164daac1f59be54ebe (patch)
treebc5958112b1a0998f87258c57fb8bbb1e06a64b6 /Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake
parentec8d37b3b1ca10535e219b37cf4889d59b1dfedb (diff)
downloadCMake-195d47e2139171cbae18a7164daac1f59be54ebe.zip
CMake-195d47e2139171cbae18a7164daac1f59be54ebe.tar.gz
CMake-195d47e2139171cbae18a7164daac1f59be54ebe.tar.bz2
VS: Allow CMAKE_GENERATOR_INSTANCE to specify portable instance
Previously the `CMAKE_GENERATOR_INSTANCE` value was used only to filter the instances reported by the Visual Studio Installer tool. If the specified install location is not known to the VS Installer, but the user provided a `version=` field, check for the installation directly on disk. Fixes: #21639, #22197
Diffstat (limited to 'Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake
index cdcaac8..dfcdcf8 100644
--- a/Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake
@@ -32,6 +32,9 @@ if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio (1[56789])")
set(RunCMake_GENERATOR_INSTANCE "${default_instance},version=${vs_major}.999.99999.999")
run_cmake(WrongVersion)
endif()
+
+ set(RunCMake_GENERATOR_INSTANCE "${RunCMake_SOURCE_DIR}")
+ run_cmake(PortableNoVersion)
else()
set(RunCMake_GENERATOR_INSTANCE "")
run_cmake(NoInstance)