diff options
author | Brad King <brad.king@kitware.com> | 2023-12-20 14:11:09 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-12-20 14:11:20 (GMT) |
commit | 30a56df0a837455313eb940d952186f41d262698 (patch) | |
tree | 83909793cad7c6e7a266dc2d67675ff00e937df8 /Source | |
parent | a350d92c06d9640b0daa75663f057a1b48a1b432 (diff) | |
parent | 0654051dde88dfb8e374ac7e53bfc46c574b0169 (diff) | |
download | CMake-30a56df0a837455313eb940d952186f41d262698.zip CMake-30a56df0a837455313eb940d952186f41d262698.tar.gz CMake-30a56df0a837455313eb940d952186f41d262698.tar.bz2 |
Merge topic 'cmake-presets-empty-architecture'
0654051dde CMakePresets.json: Don't use architecture and toolset if empty
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9093
Diffstat (limited to 'Source')
-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); } } |