diff options
author | Brad King <brad.king@kitware.com> | 2007-12-19 22:15:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-12-19 22:15:41 (GMT) |
commit | 73704ede42cdaa6e4a985329506d116db3425b3f (patch) | |
tree | 54ecbe01239632bda57e1cbf1377d9bfa9d48c55 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | f0824c7a19b34a387ba159b0c80c2688ff6dae20 (diff) | |
download | CMake-73704ede42cdaa6e4a985329506d116db3425b3f.zip CMake-73704ede42cdaa6e4a985329506d116db3425b3f.tar.gz CMake-73704ede42cdaa6e4a985329506d116db3425b3f.tar.bz2 |
ENH: Enabled color printing of "Scanning dependencies of target ..." message.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 52d12cd..9e18a58 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -31,6 +31,7 @@ #ifdef CMAKE_BUILD_WITH_CMAKE # include "cmDependsFortran.h" # include "cmDependsJava.h" +# include <cmsys/Terminal.h> #endif #include <memory> // auto_ptr @@ -1225,7 +1226,8 @@ cmLocalUnixMakefileGenerator3 //---------------------------------------------------------------------------- bool cmLocalUnixMakefileGenerator3::UpdateDependencies(const char* tgtInfo, - bool verbose) + bool verbose, + bool color) { std::string dir = cmSystemTools::GetFilenamePath(tgtInfo); std::string internalDependFile = dir + "/depend.internal"; @@ -1242,11 +1244,18 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(const char* tgtInfo, if(!checker.Check(dependFile.c_str(), internalDependFile.c_str())) { // The dependencies must be regenerated. - - // TODO: Make this like cmLocalUnixMakefileGenerator3::EchoDepend std::string targetName = cmSystemTools::GetFilenameName(dir); targetName = targetName.substr(0, targetName.length()-4); - fprintf(stdout, "Scanning dependencies of target %s\n", targetName.c_str()); + std::string message = "Scanning dependencies of target "; + message += targetName; +#ifdef CMAKE_BUILD_WITH_CMAKE + cmSystemTools::MakefileColorEcho( + cmsysTerminal_Color_ForegroundMagenta | + cmsysTerminal_Color_ForegroundBold, + message.c_str(), true, color); +#else + fprintf(stdout, "%s\n", message.c_str()); +#endif return this->ScanDependencies(tgtInfo); } |