1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 03:48:02 +08:00

Add Encoding option for RunChild, RunMakeCommand and RunProcess

This commit is contained in:
Dāvis Mosāns
2016-11-01 20:36:58 +02:00
parent 595feb3234
commit 40bd42dfbc
12 changed files with 47 additions and 27 deletions

View File

@@ -117,7 +117,7 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args,
bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
int& retVal, const char* dir,
bool verbose)
bool verbose, Encoding encoding)
{
if (cmSystemTools::GetRunCommandOutput()) {
verbose = false;
@@ -215,7 +215,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
int length;
char* data;
int p;
cmProcessOutput processOutput;
cmProcessOutput processOutput(encoding);
std::string strdata;
while ((p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p)) {
if (p == cmsysProcess_Pipe_STDOUT || p == cmsysProcess_Pipe_STDERR) {