From a3cd7fd1b55e88da5a596ca88e9f7b0f90155087 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 26 Apr 2006 21:53:21 -0400 Subject: [PATCH] COMP: Disable color support for bootstrap. --- Source/cmLocalUnixMakefileGenerator3.cxx | 2 ++ Source/cmake.cxx | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 0717db55e..85c749ae7 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -856,6 +856,7 @@ cmLocalUnixMakefileGenerator3::AppendEcho(std::vector& commands, { // Choose the color for the text. std::string color_name; +#ifdef CMAKE_BUILD_WITH_CMAKE if(this->GlobalGenerator->GetToolSupportsColor() && this->Makefile->IsOn("CMAKE_COLOR_MAKEFILE")) { @@ -882,6 +883,7 @@ cmLocalUnixMakefileGenerator3::AppendEcho(std::vector& commands, break; } } +#endif // Echo one line at a time. std::string line; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index a67ab1553..cc55aa418 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -24,12 +24,11 @@ #include "cmFileTimeComparison.h" #include "cmGeneratedFileStream.h" -#include - #if defined(CMAKE_BUILD_WITH_CMAKE) # include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback. # include "cmVariableWatch.h" # include "cmVersion.h" +# include #endif // only build kdevelop generator on non-windows platforms @@ -1007,11 +1006,13 @@ int cmake::ExecuteCMakeCommand(std::vector& args) return 1; } +#ifdef CMAKE_BUILD_WITH_CMAKE // Internal CMake color makefile support. - else if (args[1] == "cmake_echo_color" ) + else if (args[1] == "cmake_echo_color") { return cmake::ExecuteEchoColor(args); } +#endif // Tar files else if (args[1] == "tar" && args.size() > 3) @@ -2353,6 +2354,7 @@ void cmake::GenerateGraphViz(const char* fileName) } //---------------------------------------------------------------------------- +#ifdef CMAKE_BUILD_WITH_CMAKE int cmake::ExecuteEchoColor(std::vector& args) { // The arguments are @@ -2457,3 +2459,9 @@ int cmake::ExecuteEchoColor(std::vector& args) return 0; } +#else +int cmake::ExecuteEchoColor(std::vector&) +{ + return 1; +} +#endif