diff options
author | Brad King <brad.king@kitware.com> | 2021-10-26 17:45:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-26 18:07:07 (GMT) |
commit | 9eaf0932af0cd7881c712fbe4586ec59cb9e0d10 (patch) | |
tree | e8d2214d02413079ea23d8459b7d9326222d4c04 /Source/cmGlobalVisualStudioVersionedGenerator.cxx | |
parent | fb6ab54076217452e673ad310faba2a1a993366f (diff) | |
download | CMake-9eaf0932af0cd7881c712fbe4586ec59cb9e0d10.zip CMake-9eaf0932af0cd7881c712fbe4586ec59cb9e0d10.tar.gz CMake-9eaf0932af0cd7881c712fbe4586ec59cb9e0d10.tar.bz2 |
cmGlobalVisualStudioVersionedGenerator: Fix repeating SetGeneratorInstance
Fix logic added by commit 8917b8512f
(cmGlobalVisualStudioVersionedGenerator: Allow repeating
SetGeneratorInstance, 2021-10-20) to avoid repeating work.
Diffstat (limited to 'Source/cmGlobalVisualStudioVersionedGenerator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudioVersionedGenerator.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index ec2e74f..f27b2c4 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx @@ -436,9 +436,11 @@ bool cmGlobalVisualStudioVersionedGenerator::MatchesGeneratorName( bool cmGlobalVisualStudioVersionedGenerator::SetGeneratorInstance( std::string const& i, cmMakefile* mf) { - if (this->GeneratorInstance && i == *(this->GeneratorInstance)) { + if (this->LastGeneratorInstanceString && + i == *(this->LastGeneratorInstanceString)) { return true; } + if (!i.empty()) { if (!this->vsSetupAPIHelper.SetVSInstance(i)) { std::ostringstream e; @@ -478,6 +480,8 @@ bool cmGlobalVisualStudioVersionedGenerator::SetGeneratorInstance( // The selected instance may have a different MSBuild than previously found. this->MSBuildCommandInitialized = false; + this->LastGeneratorInstanceString = i; + return true; } |