summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.h
diff options
context:
space:
mode:
authorJohnny Jazeix <jazeix@gmail.com>2020-10-13 21:48:12 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-14 16:08:07 (GMT)
commitf7a5f283188c1e51b0fb549f0a78afaf1d570383 (patch)
treec5fade762b9cada9b7fd9cf964528c43ccd45c80 /Source/cmcmd.h
parent90b39a52090e6ba52424b441d5827b2b6e11ff56 (diff)
downloadCMake-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.h6
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);