mirror of
https://github.com/reactos/CMake.git
synced 2025-02-01 17:42:41 +00:00
Merge topic 'consoleBuf'
335a29cb Enable Unicode output to Windows consoles
This commit is contained in:
commit
402b133d7b
@ -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)
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user