diff options
author | Brad King <brad.king@kitware.com> | 2020-10-14 14:57:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-10-14 16:08:06 (GMT) |
commit | 90b39a52090e6ba52424b441d5827b2b6e11ff56 (patch) | |
tree | 9c4e327b43eaa0a34b3f41e210c22e103f08611d /Source/cmcmd.cxx | |
parent | f1fdd15863150fe42e99a95362a4387333502262 (diff) | |
download | CMake-90b39a52090e6ba52424b441d5827b2b6e11ff56.zip CMake-90b39a52090e6ba52424b441d5827b2b6e11ff56.tar.gz CMake-90b39a52090e6ba52424b441d5827b2b6e11ff56.tar.bz2 |
cmConsoleBuf: Factor out cout/cerr console buffer management
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index de76d73..150fefd 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -7,6 +7,7 @@ #include <cm3p/uv.h> #include <fcntl.h> +#include "cmConsoleBuf.h" #include "cmDuration.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" @@ -33,10 +34,6 @@ # include "bindexplib.h" #endif -#if !defined(CMAKE_BOOTSTRAP) && defined(_WIN32) -# include "cmsys/ConsoleBuf.hxx" -#endif - #if !defined(CMAKE_BOOTSTRAP) && defined(_WIN32) && !defined(__CYGWIN__) # include "cmVisualStudioWCEPlatformParser.h" #endif @@ -1863,14 +1860,11 @@ private: // still works. int cmcmd::VisualStudioLink(std::vector<std::string> const& args, int type) { -#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP) // Replace streambuf so we output in the system codepage. CMake is set up // to output in Unicode (see SetUTF8Pipes) but the Visual Studio linker // outputs using the system codepage so we need to change behavior when // we run the link command. - cmsys::ConsoleBuf::Manager consoleOut(std::cout); - cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); -#endif + cmConsoleBuf consoleBuf; if (args.size() < 2) { return -1; |