summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
-rw-r--r--Tests/RunCMake/Color/DiagColorInEnv.cmake9
-rw-r--r--Tests/RunCMake/Color/RunCMakeTest.cmake6
-rwxr-xr-xbootstrap6
5 files changed, 21 insertions, 4 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());
diff --git a/Tests/RunCMake/Color/DiagColorInEnv.cmake b/Tests/RunCMake/Color/DiagColorInEnv.cmake
new file mode 100644
index 0000000..83c45e5
--- /dev/null
+++ b/Tests/RunCMake/Color/DiagColorInEnv.cmake
@@ -0,0 +1,9 @@
+if (CMAKE_GENERATOR MATCHES "Makefiles")
+ set(CMAKE_COLOR_DIAGNOSTICS 1)
+ set(EXPECT_COLOR 1)
+endif ()
+include(DiagCommon.cmake)
+
+if(CMAKE_GENERATOR MATCHES "Makefiles" AND NOT DEFINED CMAKE_COLOR_MAKEFILE)
+ message(FATAL_ERROR "CMAKE_COLOR_MAKEFILE incorrectly undefined.")
+endif()
diff --git a/Tests/RunCMake/Color/RunCMakeTest.cmake b/Tests/RunCMake/Color/RunCMakeTest.cmake
index bb62d4c..d2bc45a 100644
--- a/Tests/RunCMake/Color/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Color/RunCMakeTest.cmake
@@ -12,3 +12,9 @@ endfunction()
run_Diag(On -DCMAKE_COLOR_DIAGNOSTICS=ON)
run_Diag(Off -DCMAKE_COLOR_DIAGNOSTICS=OFF)
run_Diag(Default)
+
+# Test with `COLOR` in the ambient environment set to an ANSI-like color
+# sequence. `$(COLOR)` is used in the Makefiles generator to control whether or
+# not to do such color sequences itself.
+set(ENV{COLOR} "[38;2;255;221;255m")
+run_Diag(ColorInEnv)
diff --git a/bootstrap b/bootstrap
index 109e450..cc60425 100755
--- a/bootstrap
+++ b/bootstrap
@@ -667,6 +667,8 @@ Configuration:
(for use only by package maintainers)
--no-system-libs use all cmake-provided third-party libraries
(default)
+ --system-cppdap use system-installed cppdap library
+ --no-system-cppdap use cmake-provided cppdap library (default)
--system-curl use system-installed curl library
--no-system-curl use cmake-provided curl library (default)
--system-expat use system-installed expat library
@@ -954,10 +956,10 @@ while test $# != 0; do
--init=*) cmake_init_file=`cmake_arg "$1"` ;;
--system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;;
--no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;;
- --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-librhash|--system-zlib|--system-liblzma|--system-nghttp2|--system-zstd|--system-libuv)
+ --system-bzip2|--system-cppdap|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-librhash|--system-zlib|--system-liblzma|--system-nghttp2|--system-zstd|--system-libuv)
lib=`cmake_arg "$1" "--system-"`
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;;
- --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-librhash|--no-system-zlib|--no-system-liblzma|--no-system-nghttp2|--no-system-zstd|--no-system-libuv)
+ --no-system-bzip2|--no-system-cppdap|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-librhash|--no-system-zlib|--no-system-liblzma|--no-system-nghttp2|--no-system-zstd|--no-system-libuv)
lib=`cmake_arg "$1" "--no-system-"`
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;;
--bootstrap-system-libuv) bootstrap_system_libuv="1" ;;