diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-12-19 15:19:03 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-12-19 15:19:03 (GMT) |
commit | 0654051dde88dfb8e374ac7e53bfc46c574b0169 (patch) | |
tree | 31a4ab9814dc7572688be6999319d8e5018baaee /Source/cmake.cxx | |
parent | bee73bce083565369a22ac2558dbc7d68354e476 (diff) | |
download | CMake-0654051dde88dfb8e374ac7e53bfc46c574b0169.zip CMake-0654051dde88dfb8e374ac7e53bfc46c574b0169.tar.gz CMake-0654051dde88dfb8e374ac7e53bfc46c574b0169.tar.bz2 |
CMakePresets.json: Don't use architecture and toolset if empty
Fixes: #24864
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index fd22957..32064b4 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1576,14 +1576,15 @@ void cmake::SetArgs(const std::vector<std::string>& args) if (!expandedPreset->ArchitectureStrategy || expandedPreset->ArchitectureStrategy == cmCMakePresetsGraph::ArchToolsetStrategy::Set) { - if (!this->GeneratorPlatformSet) { + if (!this->GeneratorPlatformSet && + !expandedPreset->Architecture.empty()) { this->SetGeneratorPlatform(expandedPreset->Architecture); } } if (!expandedPreset->ToolsetStrategy || expandedPreset->ToolsetStrategy == cmCMakePresetsGraph::ArchToolsetStrategy::Set) { - if (!this->GeneratorToolsetSet) { + if (!this->GeneratorToolsetSet && !expandedPreset->Toolset.empty()) { this->SetGeneratorToolset(expandedPreset->Toolset); } } |