diff options
author | Johnny Jazeix <jazeix@gmail.com> | 2020-10-13 21:48:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-10-14 16:08:07 (GMT) |
commit | f7a5f283188c1e51b0fb549f0a78afaf1d570383 (patch) | |
tree | c5fade762b9cada9b7fd9cf964528c43ccd45c80 /Source/cmcmd.h | |
parent | 90b39a52090e6ba52424b441d5827b2b6e11ff56 (diff) | |
download | CMake-f7a5f283188c1e51b0fb549f0a78afaf1d570383.zip CMake-f7a5f283188c1e51b0fb549f0a78afaf1d570383.tar.gz CMake-f7a5f283188c1e51b0fb549f0a78afaf1d570383.tar.bz2 |
cmake: Fix '-E cat' command for binary files on Windows
Reset `std::cout` to write in binary mode with no encoding conversions.
Co-Author: Brad King <brad.king@kitware.com>
Fixes: #21295
Diffstat (limited to 'Source/cmcmd.h')
-rw-r--r-- | Source/cmcmd.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 5b6c813..ffadd5a 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -5,11 +5,14 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include <memory> #include <string> #include <vector> #include "cmCryptoHash.h" +class cmConsoleBuf; + class cmcmd { public: @@ -17,7 +20,8 @@ public: * Execute commands during the build process. Supports options such * as echo, remove file etc. */ - static int ExecuteCMakeCommand(std::vector<std::string> const&); + static int ExecuteCMakeCommand(std::vector<std::string> const&, + std::unique_ptr<cmConsoleBuf> consoleBuf); protected: static int HandleCoCompileCommands(std::vector<std::string> const& args); |