summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2020-10-27 11:33:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-10-27 11:33:46 (GMT)
commit105ef112c990df78869a37f0b045087d3b0c900f (patch)
tree54985ff89210bbd426cde0228d1d62e25c355d4f /Source/cmake.cxx
parentc79e02c4c3acb16d81d1b940074853f653634546 (diff)
parentb7d7eca66db97f9dcb6068762733f06941c0c05a (diff)
downloadCMake-105ef112c990df78869a37f0b045087d3b0c900f.zip
CMake-105ef112c990df78869a37f0b045087d3b0c900f.tar.gz
CMake-105ef112c990df78869a37f0b045087d3b0c900f.tar.bz2
Merge topic 'cmake-presets-path-arg'
b7d7eca66d CMakePresets.json: Rework how --preset argument is handled Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5416
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index de3025b..7a9e493 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -727,6 +727,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
{
bool haveToolset = false;
bool havePlatform = false;
+ bool haveBArg = false;
#if !defined(CMAKE_BOOTSTRAP)
std::string profilingFormat;
std::string profilingOutput;
@@ -775,6 +776,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
path = cmSystemTools::CollapseFullPath(path);
cmSystemTools::ConvertToUnixSlashes(path);
this->SetHomeOutputDirectory(path);
+ haveBArg = true;
} else if ((i < args.size() - 2) &&
cmHasLiteralPrefix(arg, "--check-build-system")) {
this->CheckBuildSystemArgument = args[++i];
@@ -1057,7 +1059,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
return;
}
- if (!haveBinaryDir) {
+ if (!this->State->IsCacheLoaded() && !haveBArg) {
this->SetHomeOutputDirectory(expandedPreset->BinaryDir);
}
if (!this->GlobalGenerator) {