|
@@ -1089,7 +1089,8 @@ cmTarget* cmLocalGenerator::AddCustomCommandToTarget(
|
|
|
const cmCustomCommandLines& commandLines, cmCustomCommandType type,
|
|
const cmCustomCommandLines& commandLines, cmCustomCommandType type,
|
|
|
const char* comment, const char* workingDir, bool escapeOldStyle,
|
|
const char* comment, const char* workingDir, bool escapeOldStyle,
|
|
|
bool uses_terminal, const std::string& depfile, const std::string& job_pool,
|
|
bool uses_terminal, const std::string& depfile, const std::string& job_pool,
|
|
|
- bool command_expand_lists, cmObjectLibraryCommands objLibCommands)
|
|
|
|
|
|
|
+ bool command_expand_lists, cmObjectLibraryCommands objLibCommands,
|
|
|
|
|
+ bool stdPipesUTF8)
|
|
|
{
|
|
{
|
|
|
cmTarget* t = this->Makefile->GetCustomCommandTarget(
|
|
cmTarget* t = this->Makefile->GetCustomCommandTarget(
|
|
|
target, objLibCommands, this->DirectoryBacktrace);
|
|
target, objLibCommands, this->DirectoryBacktrace);
|
|
@@ -1100,7 +1101,7 @@ cmTarget* cmLocalGenerator::AddCustomCommandToTarget(
|
|
|
detail::AddCustomCommandToTarget(
|
|
detail::AddCustomCommandToTarget(
|
|
|
*this, this->DirectoryBacktrace, cmCommandOrigin::Generator, t, byproducts,
|
|
*this, this->DirectoryBacktrace, cmCommandOrigin::Generator, t, byproducts,
|
|
|
depends, commandLines, type, comment, workingDir, escapeOldStyle,
|
|
depends, commandLines, type, comment, workingDir, escapeOldStyle,
|
|
|
- uses_terminal, depfile, job_pool, command_expand_lists);
|
|
|
|
|
|
|
+ uses_terminal, depfile, job_pool, command_expand_lists, stdPipesUTF8);
|
|
|
|
|
|
|
|
return t;
|
|
return t;
|
|
|
}
|
|
}
|
|
@@ -1110,14 +1111,14 @@ cmSourceFile* cmLocalGenerator::AddCustomCommandToOutput(
|
|
|
const std::string& main_dependency, const cmCustomCommandLines& commandLines,
|
|
const std::string& main_dependency, const cmCustomCommandLines& commandLines,
|
|
|
const char* comment, const char* workingDir, bool replace,
|
|
const char* comment, const char* workingDir, bool replace,
|
|
|
bool escapeOldStyle, bool uses_terminal, bool command_expand_lists,
|
|
bool escapeOldStyle, bool uses_terminal, bool command_expand_lists,
|
|
|
- const std::string& depfile, const std::string& job_pool)
|
|
|
|
|
|
|
+ const std::string& depfile, const std::string& job_pool, bool stdPipesUTF8)
|
|
|
{
|
|
{
|
|
|
std::vector<std::string> no_byproducts;
|
|
std::vector<std::string> no_byproducts;
|
|
|
cmImplicitDependsList no_implicit_depends;
|
|
cmImplicitDependsList no_implicit_depends;
|
|
|
return this->AddCustomCommandToOutput(
|
|
return this->AddCustomCommandToOutput(
|
|
|
{ output }, no_byproducts, depends, main_dependency, no_implicit_depends,
|
|
{ output }, no_byproducts, depends, main_dependency, no_implicit_depends,
|
|
|
commandLines, comment, workingDir, replace, escapeOldStyle, uses_terminal,
|
|
commandLines, comment, workingDir, replace, escapeOldStyle, uses_terminal,
|
|
|
- command_expand_lists, depfile, job_pool);
|
|
|
|
|
|
|
+ command_expand_lists, depfile, job_pool, stdPipesUTF8);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
cmSourceFile* cmLocalGenerator::AddCustomCommandToOutput(
|
|
cmSourceFile* cmLocalGenerator::AddCustomCommandToOutput(
|
|
@@ -1128,7 +1129,7 @@ cmSourceFile* cmLocalGenerator::AddCustomCommandToOutput(
|
|
|
const cmCustomCommandLines& commandLines, const char* comment,
|
|
const cmCustomCommandLines& commandLines, const char* comment,
|
|
|
const char* workingDir, bool replace, bool escapeOldStyle,
|
|
const char* workingDir, bool replace, bool escapeOldStyle,
|
|
|
bool uses_terminal, bool command_expand_lists, const std::string& depfile,
|
|
bool uses_terminal, bool command_expand_lists, const std::string& depfile,
|
|
|
- const std::string& job_pool)
|
|
|
|
|
|
|
+ const std::string& job_pool, bool stdPipesUTF8)
|
|
|
{
|
|
{
|
|
|
// Make sure there is at least one output.
|
|
// Make sure there is at least one output.
|
|
|
if (outputs.empty()) {
|
|
if (outputs.empty()) {
|
|
@@ -1140,7 +1141,7 @@ cmSourceFile* cmLocalGenerator::AddCustomCommandToOutput(
|
|
|
*this, this->DirectoryBacktrace, cmCommandOrigin::Generator, outputs,
|
|
*this, this->DirectoryBacktrace, cmCommandOrigin::Generator, outputs,
|
|
|
byproducts, depends, main_dependency, implicit_depends, commandLines,
|
|
byproducts, depends, main_dependency, implicit_depends, commandLines,
|
|
|
comment, workingDir, replace, escapeOldStyle, uses_terminal,
|
|
comment, workingDir, replace, escapeOldStyle, uses_terminal,
|
|
|
- command_expand_lists, depfile, job_pool);
|
|
|
|
|
|
|
+ command_expand_lists, depfile, job_pool, stdPipesUTF8);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
cmTarget* cmLocalGenerator::AddUtilityCommand(
|
|
cmTarget* cmLocalGenerator::AddUtilityCommand(
|
|
@@ -1149,7 +1150,7 @@ cmTarget* cmLocalGenerator::AddUtilityCommand(
|
|
|
const std::vector<std::string>& depends,
|
|
const std::vector<std::string>& depends,
|
|
|
const cmCustomCommandLines& commandLines, bool escapeOldStyle,
|
|
const cmCustomCommandLines& commandLines, bool escapeOldStyle,
|
|
|
const char* comment, bool uses_terminal, bool command_expand_lists,
|
|
const char* comment, bool uses_terminal, bool command_expand_lists,
|
|
|
- const std::string& job_pool)
|
|
|
|
|
|
|
+ const std::string& job_pool, bool stdPipesUTF8)
|
|
|
{
|
|
{
|
|
|
cmTarget* target =
|
|
cmTarget* target =
|
|
|
this->Makefile->AddNewUtilityTarget(utilityName, excludeFromAll);
|
|
this->Makefile->AddNewUtilityTarget(utilityName, excludeFromAll);
|
|
@@ -1163,7 +1164,7 @@ cmTarget* cmLocalGenerator::AddUtilityCommand(
|
|
|
*this, this->DirectoryBacktrace, cmCommandOrigin::Generator, target,
|
|
*this, this->DirectoryBacktrace, cmCommandOrigin::Generator, target,
|
|
|
this->Makefile->GetUtilityOutput(target), workingDir, byproducts, depends,
|
|
this->Makefile->GetUtilityOutput(target), workingDir, byproducts, depends,
|
|
|
commandLines, escapeOldStyle, comment, uses_terminal, command_expand_lists,
|
|
commandLines, escapeOldStyle, comment, uses_terminal, command_expand_lists,
|
|
|
- job_pool);
|
|
|
|
|
|
|
+ job_pool, stdPipesUTF8);
|
|
|
|
|
|
|
|
return target;
|
|
return target;
|
|
|
}
|
|
}
|
|
@@ -2648,6 +2649,7 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
|
|
|
file << "endif()\n";
|
|
file << "endif()\n";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ bool stdPipesUTF8 = true;
|
|
|
cmCustomCommandLines commandLines = cmMakeSingleCommandLine(
|
|
cmCustomCommandLines commandLines = cmMakeSingleCommandLine(
|
|
|
{ cmSystemTools::GetCMakeCommand(),
|
|
{ cmSystemTools::GetCMakeCommand(),
|
|
|
cmStrCat("-DPDB_PREFIX=", pdb_prefix), "-P",
|
|
cmStrCat("-DPDB_PREFIX=", pdb_prefix), "-P",
|
|
@@ -2666,14 +2668,16 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
|
|
|
if (this->GetGlobalGenerator()->IsVisualStudio()) {
|
|
if (this->GetGlobalGenerator()->IsVisualStudio()) {
|
|
|
this->AddCustomCommandToTarget(
|
|
this->AddCustomCommandToTarget(
|
|
|
target->GetName(), outputs, no_deps, commandLines,
|
|
target->GetName(), outputs, no_deps, commandLines,
|
|
|
- cmCustomCommandType::PRE_BUILD, no_message,
|
|
|
|
|
- no_current_dir);
|
|
|
|
|
|
|
+ cmCustomCommandType::PRE_BUILD, no_message, no_current_dir,
|
|
|
|
|
+ true, false, "", "", false,
|
|
|
|
|
+ cmObjectLibraryCommands::Reject, stdPipesUTF8);
|
|
|
} else {
|
|
} else {
|
|
|
cmImplicitDependsList no_implicit_depends;
|
|
cmImplicitDependsList no_implicit_depends;
|
|
|
cmSourceFile* copy_rule = this->AddCustomCommandToOutput(
|
|
cmSourceFile* copy_rule = this->AddCustomCommandToOutput(
|
|
|
outputs, no_byproducts, no_deps, no_main_dependency,
|
|
outputs, no_byproducts, no_deps, no_main_dependency,
|
|
|
no_implicit_depends, commandLines, no_message,
|
|
no_implicit_depends, commandLines, no_message,
|
|
|
- no_current_dir);
|
|
|
|
|
|
|
+ no_current_dir, false, true, false, false, "", "",
|
|
|
|
|
+ stdPipesUTF8);
|
|
|
|
|
|
|
|
if (copy_rule) {
|
|
if (copy_rule) {
|
|
|
target->AddSource(copy_rule->ResolveFullPath());
|
|
target->AddSource(copy_rule->ResolveFullPath());
|
|
@@ -3730,7 +3734,7 @@ cmSourceFile* AddCustomCommand(
|
|
|
const cmCustomCommandLines& commandLines, const char* comment,
|
|
const cmCustomCommandLines& commandLines, const char* comment,
|
|
|
const char* workingDir, bool replace, bool escapeOldStyle,
|
|
const char* workingDir, bool replace, bool escapeOldStyle,
|
|
|
bool uses_terminal, bool command_expand_lists, const std::string& depfile,
|
|
bool uses_terminal, bool command_expand_lists, const std::string& depfile,
|
|
|
- const std::string& job_pool)
|
|
|
|
|
|
|
+ const std::string& job_pool, bool stdPipesUTF8)
|
|
|
{
|
|
{
|
|
|
cmMakefile* mf = lg.GetMakefile();
|
|
cmMakefile* mf = lg.GetMakefile();
|
|
|
|
|
|
|
@@ -3792,7 +3796,8 @@ cmSourceFile* AddCustomCommand(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
std::unique_ptr<cmCustomCommand> cc = cm::make_unique<cmCustomCommand>(
|
|
std::unique_ptr<cmCustomCommand> cc = cm::make_unique<cmCustomCommand>(
|
|
|
- outputs, byproducts, depends2, commandLines, lfbt, comment, workingDir);
|
|
|
|
|
|
|
+ outputs, byproducts, depends2, commandLines, lfbt, comment, workingDir,
|
|
|
|
|
+ stdPipesUTF8);
|
|
|
cc->SetEscapeOldStyle(escapeOldStyle);
|
|
cc->SetEscapeOldStyle(escapeOldStyle);
|
|
|
cc->SetEscapeAllowMakeVars(true);
|
|
cc->SetEscapeAllowMakeVars(true);
|
|
|
cc->SetImplicitDepends(implicit_depends);
|
|
cc->SetImplicitDepends(implicit_depends);
|
|
@@ -3819,7 +3824,7 @@ void AddCustomCommandToTarget(cmLocalGenerator& lg,
|
|
|
const char* workingDir, bool escapeOldStyle,
|
|
const char* workingDir, bool escapeOldStyle,
|
|
|
bool uses_terminal, const std::string& depfile,
|
|
bool uses_terminal, const std::string& depfile,
|
|
|
const std::string& job_pool,
|
|
const std::string& job_pool,
|
|
|
- bool command_expand_lists)
|
|
|
|
|
|
|
+ bool command_expand_lists, bool stdPipesUTF8)
|
|
|
{
|
|
{
|
|
|
cmMakefile* mf = lg.GetMakefile();
|
|
cmMakefile* mf = lg.GetMakefile();
|
|
|
|
|
|
|
@@ -3829,7 +3834,7 @@ void AddCustomCommandToTarget(cmLocalGenerator& lg,
|
|
|
// Add the command to the appropriate build step for the target.
|
|
// Add the command to the appropriate build step for the target.
|
|
|
std::vector<std::string> no_output;
|
|
std::vector<std::string> no_output;
|
|
|
cmCustomCommand cc(no_output, byproducts, depends, commandLines, lfbt,
|
|
cmCustomCommand cc(no_output, byproducts, depends, commandLines, lfbt,
|
|
|
- comment, workingDir);
|
|
|
|
|
|
|
+ comment, workingDir, stdPipesUTF8);
|
|
|
cc.SetEscapeOldStyle(escapeOldStyle);
|
|
cc.SetEscapeOldStyle(escapeOldStyle);
|
|
|
cc.SetEscapeAllowMakeVars(true);
|
|
cc.SetEscapeAllowMakeVars(true);
|
|
|
cc.SetUsesTerminal(uses_terminal);
|
|
cc.SetUsesTerminal(uses_terminal);
|
|
@@ -3860,7 +3865,7 @@ cmSourceFile* AddCustomCommandToOutput(
|
|
|
const cmCustomCommandLines& commandLines, const char* comment,
|
|
const cmCustomCommandLines& commandLines, const char* comment,
|
|
|
const char* workingDir, bool replace, bool escapeOldStyle,
|
|
const char* workingDir, bool replace, bool escapeOldStyle,
|
|
|
bool uses_terminal, bool command_expand_lists, const std::string& depfile,
|
|
bool uses_terminal, bool command_expand_lists, const std::string& depfile,
|
|
|
- const std::string& job_pool)
|
|
|
|
|
|
|
+ const std::string& job_pool, bool stdPipesUTF8)
|
|
|
{
|
|
{
|
|
|
// Always create the output sources and mark them generated.
|
|
// Always create the output sources and mark them generated.
|
|
|
CreateGeneratedSources(lg, outputs, origin, lfbt);
|
|
CreateGeneratedSources(lg, outputs, origin, lfbt);
|
|
@@ -3869,7 +3874,7 @@ cmSourceFile* AddCustomCommandToOutput(
|
|
|
return AddCustomCommand(
|
|
return AddCustomCommand(
|
|
|
lg, lfbt, outputs, byproducts, depends, main_dependency, implicit_depends,
|
|
lg, lfbt, outputs, byproducts, depends, main_dependency, implicit_depends,
|
|
|
commandLines, comment, workingDir, replace, escapeOldStyle, uses_terminal,
|
|
commandLines, comment, workingDir, replace, escapeOldStyle, uses_terminal,
|
|
|
- command_expand_lists, depfile, job_pool);
|
|
|
|
|
|
|
+ command_expand_lists, depfile, job_pool, stdPipesUTF8);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void AppendCustomCommandToOutput(cmLocalGenerator& lg,
|
|
void AppendCustomCommandToOutput(cmLocalGenerator& lg,
|
|
@@ -3905,7 +3910,7 @@ void AddUtilityCommand(cmLocalGenerator& lg, const cmListFileBacktrace& lfbt,
|
|
|
const cmCustomCommandLines& commandLines,
|
|
const cmCustomCommandLines& commandLines,
|
|
|
bool escapeOldStyle, const char* comment,
|
|
bool escapeOldStyle, const char* comment,
|
|
|
bool uses_terminal, bool command_expand_lists,
|
|
bool uses_terminal, bool command_expand_lists,
|
|
|
- const std::string& job_pool)
|
|
|
|
|
|
|
+ const std::string& job_pool, bool stdPipesUTF8)
|
|
|
{
|
|
{
|
|
|
// Always create the byproduct sources and mark them generated.
|
|
// Always create the byproduct sources and mark them generated.
|
|
|
CreateGeneratedSource(lg, force.Name, origin, lfbt);
|
|
CreateGeneratedSource(lg, force.Name, origin, lfbt);
|
|
@@ -3922,7 +3927,7 @@ void AddUtilityCommand(cmLocalGenerator& lg, const cmListFileBacktrace& lfbt,
|
|
|
lg, lfbt, { force.Name }, byproducts, depends, no_main_dependency,
|
|
lg, lfbt, { force.Name }, byproducts, depends, no_main_dependency,
|
|
|
no_implicit_depends, commandLines, comment, workingDir, /*replace=*/false,
|
|
no_implicit_depends, commandLines, comment, workingDir, /*replace=*/false,
|
|
|
escapeOldStyle, uses_terminal, command_expand_lists, /*depfile=*/"",
|
|
escapeOldStyle, uses_terminal, command_expand_lists, /*depfile=*/"",
|
|
|
- job_pool);
|
|
|
|
|
|
|
+ job_pool, stdPipesUTF8);
|
|
|
if (rule) {
|
|
if (rule) {
|
|
|
lg.GetMakefile()->AddTargetByproducts(target, byproducts);
|
|
lg.GetMakefile()->AddTargetByproducts(target, byproducts);
|
|
|
}
|
|
}
|