This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via b0ab3549ef8113079c1f2957977b389a3858ab3a (commit) via 4551b1ae134a3d1f6c7a30a9b941000a466a11ef (commit) via 39b08858f676f0251898ffc7601ad216bb87ae21 (commit) from 49fe82b52d6dd1c034b130ff17dd6c9f9511ce63 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0ab3549ef8113079c1f2957977b389a3858ab3a commit b0ab3549ef8113079c1f2957977b389a3858ab3a Merge: 49fe82b 4551b1a Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Oct 13 09:33:51 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Oct 13 09:33:51 2016 -0400 Merge topic 'consoleBuf' into next 4551b1ae Enable Unicode output to Windows consoles 39b08858 cmSystemTools: Flush output buffer for list_item_verbose https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4551b1ae134a3d1f6c7a30a9b941000a466a11ef commit 4551b1ae134a3d1f6c7a30a9b941000a466a11ef Author: Dāvis Mosāns <davis...@gmail.com> AuthorDate: Sat Oct 1 03:11:35 2016 +0300 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Oct 13 09:31:20 2016 -0400 Enable Unicode output to Windows consoles Use KWSys ConsoleBuf to replace the `streambuf` on `std::cout` and `std::cerr` so that process output can be encoded correctly for display in a Windows console. diff --git a/CMakeLists.txt b/CMakeLists.txt index b8a635f..1bc4b4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,6 +260,7 @@ macro (CMAKE_BUILD_UTILITIES) set(KWSYS_USE_MD5 1) set(KWSYS_USE_Process 1) set(KWSYS_USE_CommandLineArguments 1) + set(KWSYS_USE_ConsoleBuf 1) set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source) set(KWSYS_INSTALL_DOC_DIR "${CMAKE_DOC_DIR}") add_subdirectory(Source/kwsys) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index a3281ab..1e9bb0f 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -17,6 +17,9 @@ #include <cmsys/CommandLineArguments.hxx> #include <cmsys/Encoding.hxx> +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include <cmsys/ConsoleBuf.hxx> +#endif #include <iostream> #include <map> #include <sstream> @@ -84,6 +87,11 @@ int cpackDefinitionArgument(const char* argument, const char* cValue, // this is CPack. int main(int argc, char const* const* argv) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = args.argc(); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 0d1f1ce..3f71011 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -18,6 +18,9 @@ #include <cmConfigure.h> #include <cmsys/Encoding.hxx> +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include <cmsys/ConsoleBuf.hxx> +#endif #include <iostream> #include <string.h> #include <string> @@ -153,6 +156,11 @@ static void cmakemainProgressCallback(const char* m, float prog, int main(int ac, char const* const* av) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(ac, av); ac = args.argc(); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 8ab17b9..1acd240 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -10,6 +10,9 @@ #include "cmake.h" #include <cmsys/Encoding.hxx> +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include <cmsys/ConsoleBuf.hxx> +#endif #include <iostream> #include <string.h> #include <string> @@ -110,6 +113,11 @@ static const char* cmDocumentationOptions[][2] = { // this is a test driver program for cmCTest. int main(int argc, char const* const* argv) { +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) + // Replace streambuf so we can output Unicode to console + cmsys::ConsoleBuf::Manager consoleOut(std::cout); + cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); +#endif cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = encoding_args.argc(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=39b08858f676f0251898ffc7601ad216bb87ae21 commit 39b08858f676f0251898ffc7601ad216bb87ae21 Author: Dāvis Mosāns <davis...@gmail.com> AuthorDate: Tue Oct 11 22:46:10 2016 +0300 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Oct 13 09:24:45 2016 -0400 cmSystemTools: Flush output buffer for list_item_verbose When `std::cout` and `FILE *stdout` are used at same time need to explicitly flush otherwise they can be out of sync. diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index d800ef8..0a3a1ab 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1499,6 +1499,7 @@ void list_item_verbose(FILE* out, struct archive_entry* entry) { fprintf(out, " -> %s", archive_entry_symlink(entry)); } + fflush(out); } long copy_data(struct archive* ar, struct archive* aw) ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 1 + Source/CPack/cpack.cxx | 8 ++++++++ Source/cmSystemTools.cxx | 1 + Source/cmakemain.cxx | 8 ++++++++ Source/ctest.cxx | 8 ++++++++ 5 files changed, 26 insertions(+) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits