summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-06-09 13:58:17 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-06-09 13:58:26 (GMT)
commit507f04af1125c16509f775f60ead182d9154f495 (patch)
tree1ffbbc10da0f32df7c35eae29e0d1154235e50a2 /Source
parent8761cfa0bf2485d05988430b51e332189bea38b4 (diff)
parent8195aa30269773732902029741fb8adfe13aa83d (diff)
downloadCMake-507f04af1125c16509f775f60ead182d9154f495.zip
CMake-507f04af1125c16509f775f60ead182d9154f495.tar.gz
CMake-507f04af1125c16509f775f60ead182d9154f495.tar.bz2
Merge topic 'Makefiles-safer-COLOR-usage'
8195aa3026 Makefiles: quote `$(COLOR)` expansions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8548
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 43711b3..3c6b303 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1222,7 +1222,7 @@ void cmLocalUnixMakefileGenerator3::AppendEcho(
} else {
// Use cmake to echo the text in color.
cmd = cmStrCat(
- "@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) ",
+ "@$(CMAKE_COMMAND) -E cmake_echo_color \"--switch=$(COLOR)\" ",
color_name);
if (progress) {
cmd += "--progress-dir=";
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 8099d44..5f27856 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1525,7 +1525,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
cmSystemTools::CollapseFullPath(this->InfoFileNameFull),
cmOutputConverter::SHELL);
if (this->LocalGenerator->GetColorMakefile()) {
- depCmd << " --color=$(COLOR)";
+ depCmd << " \"--color=$(COLOR)\"";
}
commands.push_back(depCmd.str());