summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-20 14:11:09 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-12-20 14:11:20 (GMT)
commit30a56df0a837455313eb940d952186f41d262698 (patch)
tree83909793cad7c6e7a266dc2d67675ff00e937df8 /Source
parenta350d92c06d9640b0daa75663f057a1b48a1b432 (diff)
parent0654051dde88dfb8e374ac7e53bfc46c574b0169 (diff)
downloadCMake-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.cxx5
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);
}
}