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/cmConsoleBuf.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/cmConsoleBuf.cxx')
-rw-r--r-- | Source/cmConsoleBuf.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/cmConsoleBuf.cxx b/Source/cmConsoleBuf.cxx new file mode 100644 index 0000000..70be481 --- /dev/null +++ b/Source/cmConsoleBuf.cxx @@ -0,0 +1,23 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmConsoleBuf.h" + +#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP) +cmConsoleBuf::cmConsoleBuf() + : m_ConsoleOut(std::cout) + , m_ConsoleErr(std::cerr, true) +{ +} +#else +cmConsoleBuf::cmConsoleBuf() = default; +#endif + +cmConsoleBuf::~cmConsoleBuf() = default; + +void cmConsoleBuf::SetUTF8Pipes() +{ +#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP) + m_ConsoleOut.SetUTF8Pipes(); + m_ConsoleErr.SetUTF8Pipes(); +#endif +} |