diff options
author | Brad King <brad.king@kitware.com> | 2021-10-21 16:17:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-29 15:52:58 (GMT) |
commit | 195d47e2139171cbae18a7164daac1f59be54ebe (patch) | |
tree | bc5958112b1a0998f87258c57fb8bbb1e06a64b6 /Tests/RunCMake/GeneratorInstance/RunCMakeTest.cmake | |
parent | ec8d37b3b1ca10535e219b37cf4889d59b1dfedb (diff) | |
download | CMake-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.cmake | 3 |
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) |