From 846a650ff7f4aa609a95d57b01b065a1d4bd7101 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 20 Jul 2022 17:03:50 -0400 Subject: cmake: In -P mode ignore extra paths on the command line Fixes: #23748 --- Source/cmake.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/cmake.cxx') diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 4e1862854c..1c1cab37fd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1796,7 +1796,8 @@ void cmake::SetHomeDirectoryViaCommandLine(std::string const& path) } auto prev_path = this->GetHomeDirectory(); - if (prev_path != path && !prev_path.empty()) { + if (prev_path != path && !prev_path.empty() && + this->GetWorkingMode() == NORMAL_MODE) { this->IssueMessage(MessageType::WARNING, cmStrCat("Ignoring extra path from command line:\n \"", prev_path, "\"")); -- cgit v1.2.1