diff options
author | Patrick Gansterer <paroga@paroga.com> | 2013-07-29 08:52:54 +0200 |
---|---|---|
committer | Patrick Gansterer <paroga@paroga.com> | 2013-07-29 08:52:54 +0200 |
commit | 2b473d2eaa2d09a69fc5a4f37d24ad051d5ead9a (patch) | |
tree | c310b0bd0e73d2ad99f3b7fd027c213e4dbbc80a /Source/cmakemain.cxx | |
parent | fc1708ac99ead110417911609a2b67d4deae9d34 (diff) | |
download | cmake-2b473d2eaa2d09a69fc5a4f37d24ad051d5ead9a.tar.gz |
Add option to use stdout/stderr of original terminal in cmake --build
Pass the original file handles to the native tool when using the
--use-stderr option in the build command. This enables the
usage of advanced terminal features like colored output.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 77a5e43949..5e911bc748 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -62,7 +62,10 @@ static const char * cmDocumentationDescription[][3] = " --config <cfg> = For multi-configuration tools, choose <cfg>.\n" \ " --clean-first = Build target 'clean' first, then build.\n" \ " (To clean only, use --target 'clean'.)\n" \ - " --use-stderr = Don't merge stdout/stderr.\n" \ + " --use-stderr = Don't merge stdout/stderr output and pass the\n" \ + " original stdout/stderr handles to the native\n" \ + " tool so it can use the capabilities of the\n" \ + " calling terminal (e.g. colored output).\n" \ " -- = Pass remaining options to the native tool.\n" //---------------------------------------------------------------------------- @@ -604,7 +607,7 @@ static int do_build(int ac, char** av) } else if(strcmp(av[i], "--use-stderr") == 0) { - outputflag = cmSystemTools::OUTPUT_NORMAL; + outputflag = cmSystemTools::OUTPUT_PASSTHROUGH; } else if(strcmp(av[i], "--") == 0) { |