diff options
author | Brad King <brad.king@kitware.com> | 2020-10-15 12:11:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-10-15 12:11:56 (GMT) |
commit | 7c0de4175b880c8e0c2baf638d1af3be190a0b6d (patch) | |
tree | c5fade762b9cada9b7fd9cf964528c43ccd45c80 /Source/CPack/cpack.cxx | |
parent | 3cc3d42aba879fff5e85b363ae8f21386a3f9f9b (diff) | |
parent | f7a5f283188c1e51b0fb549f0a78afaf1d570383 (diff) | |
download | CMake-7c0de4175b880c8e0c2baf638d1af3be190a0b6d.zip CMake-7c0de4175b880c8e0c2baf638d1af3be190a0b6d.tar.gz CMake-7c0de4175b880c8e0c2baf638d1af3be190a0b6d.tar.bz2 |
Merge branch 'cmake-E-cat-binary' into release-3.18
Merge-request: !5364
Diffstat (limited to 'Source/CPack/cpack.cxx')
-rw-r--r-- | Source/CPack/cpack.cxx | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 3a400b7..cc1ddf5 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -1,12 +1,22 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ +#include <cstddef> +#include <iostream> +#include <map> +#include <memory> +#include <sstream> +#include <string> +#include <utility> +#include <vector> + #include "cmsys/CommandLineArguments.hxx" #include "cmsys/Encoding.hxx" #include "cmCPackGenerator.h" #include "cmCPackGeneratorFactory.h" #include "cmCPackLog.h" +#include "cmConsoleBuf.h" #include "cmDocumentation.h" #include "cmDocumentationEntry.h" #include "cmDocumentationFormatter.h" @@ -18,19 +28,6 @@ #include "cmSystemTools.h" #include "cmake.h" -#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP) -# include "cmsys/ConsoleBuf.hxx" -#endif - -#include <cstddef> -#include <iostream> -#include <map> -#include <memory> -#include <sstream> -#include <string> -#include <utility> -#include <vector> - namespace { const char* cmDocumentationName[][2] = { { nullptr, " cpack - Packaging driver provided by CMake." }, @@ -103,13 +100,11 @@ void cpackProgressCallback(const std::string& message, float /*unused*/) int main(int argc, char const* const* argv) { cmSystemTools::EnsureStdPipes(); -#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP) + // Replace streambuf so we can output Unicode to console - cmsys::ConsoleBuf::Manager consoleOut(std::cout); - consoleOut.SetUTF8Pipes(); - cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); - consoleErr.SetUTF8Pipes(); -#endif + cmConsoleBuf consoleBuf; + consoleBuf.SetUTF8Pipes(); + cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = args.argc(); |