diff options
author | Brad King <brad.king@kitware.com> | 2015-02-10 14:37:55 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-02-10 14:37:55 (GMT) |
commit | c548ddc1724c9c96bab04d2f51d1740360bcb737 (patch) | |
tree | d0919e30d88c7599782c80fd293ab53ae1ef1df9 /Source/cmSystemTools.cxx | |
parent | 1d6f4b6fcc04620fd5f8e090381e8330dc2a4b23 (diff) | |
parent | 63668954e002aa41ff0287aae22caeeacdc0c356 (diff) | |
download | CMake-c548ddc1724c9c96bab04d2f51d1740360bcb737.zip CMake-c548ddc1724c9c96bab04d2f51d1740360bcb737.tar.gz CMake-c548ddc1724c9c96bab04d2f51d1740360bcb737.tar.bz2 |
Merge topic 'makefile-progress-improvements'
63668954 Help: Add notes for topic 'makefile-progress-improvements'
ae775fe8 Makefile: Change link step message color to bold green
7bb50e4a Makefile: Add progress to link step messages
c6ada827 Makefile: Print all color escape sequences before newline
8521fdf5 Makefile: Fix output during parallel builds (#12991)
69ac6d27 bootstrap: Enable color Makefile output
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 6a7467f..d6f8d6b 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -28,10 +28,10 @@ # include "cmArchiveWrite.h" # include "cmLocale.h" # include <cm_libarchive.h> -# include <cmsys/Terminal.h> #endif #include <cmsys/stl/algorithm> #include <cmsys/FStream.hxx> +#include <cmsys/Terminal.h> #if defined(_WIN32) # include <windows.h> @@ -2287,7 +2287,6 @@ std::string const& cmSystemTools::GetCMakeRoot() } //---------------------------------------------------------------------------- -#if defined(CMAKE_BUILD_WITH_CMAKE) void cmSystemTools::MakefileColorEcho(int color, const char* message, bool newline, bool enabled) { @@ -2308,16 +2307,21 @@ void cmSystemTools::MakefileColorEcho(int color, const char* message, if(enabled) { - cmsysTerminal_cfprintf(color | assumeTTY, stdout, "%s%s", - message, newline? "\n" : ""); + // Print with color. Delay the newline until later so that + // all color restore sequences appear before it. + cmsysTerminal_cfprintf(color | assumeTTY, stdout, "%s", message); } else { // Color is disabled. Print without color. - fprintf(stdout, "%s%s", message, newline? "\n" : ""); + fprintf(stdout, "%s", message); + } + + if(newline) + { + fprintf(stdout, "\n"); } } -#endif //---------------------------------------------------------------------------- bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath, |