|
|
@@ -1129,9 +1129,8 @@ cmTarget* cmLocalGenerator::AddUtilityCommand(
|
|
|
|
|
|
detail::AddUtilityCommand(
|
|
|
*this, this->DirectoryBacktrace, cmCommandOrigin::Generator, target,
|
|
|
- this->Makefile->GetUtilityOutput(target), workingDir, byproducts, depends,
|
|
|
- commandLines, escapeOldStyle, comment, uses_terminal, command_expand_lists,
|
|
|
- job_pool, stdPipesUTF8);
|
|
|
+ workingDir, byproducts, depends, commandLines, escapeOldStyle, comment,
|
|
|
+ uses_terminal, command_expand_lists, job_pool, stdPipesUTF8);
|
|
|
|
|
|
return target;
|
|
|
}
|
|
|
@@ -4115,7 +4114,7 @@ void AppendCustomCommandToOutput(cmLocalGenerator& lg,
|
|
|
|
|
|
void AddUtilityCommand(cmLocalGenerator& lg, const cmListFileBacktrace& lfbt,
|
|
|
cmCommandOrigin origin, cmTarget* target,
|
|
|
- std::string const& force, const char* workingDir,
|
|
|
+ const char* workingDir,
|
|
|
const std::vector<std::string>& byproducts,
|
|
|
const std::vector<std::string>& depends,
|
|
|
const cmCustomCommandLines& commandLines,
|
|
|
@@ -4128,10 +4127,13 @@ void AddUtilityCommand(cmLocalGenerator& lg, const cmListFileBacktrace& lfbt,
|
|
|
comment = "";
|
|
|
}
|
|
|
|
|
|
+ // Create the generated symbolic output name of the utility target.
|
|
|
+ std::string output = lg.CreateUtilityOutput(target->GetName());
|
|
|
+
|
|
|
std::string no_main_dependency;
|
|
|
cmImplicitDependsList no_implicit_depends;
|
|
|
cmSourceFile* rule = AddCustomCommand(
|
|
|
- lg, lfbt, origin, { force }, byproducts, depends, no_main_dependency,
|
|
|
+ lg, lfbt, origin, { output }, byproducts, depends, no_main_dependency,
|
|
|
no_implicit_depends, commandLines, comment, workingDir,
|
|
|
/*replace=*/false, escapeOldStyle, uses_terminal, command_expand_lists,
|
|
|
/*depfile=*/"", job_pool, stdPipesUTF8);
|
|
|
@@ -4139,7 +4141,7 @@ void AddUtilityCommand(cmLocalGenerator& lg, const cmListFileBacktrace& lfbt,
|
|
|
lg.AddTargetByproducts(target, byproducts, lfbt, origin);
|
|
|
}
|
|
|
|
|
|
- target->AddSource(force);
|
|
|
+ target->AddSource(output);
|
|
|
}
|
|
|
|
|
|
std::vector<std::string> ComputeISPCObjectSuffixes(cmGeneratorTarget* target)
|
|
|
@@ -4232,6 +4234,20 @@ cmSourceFile* cmLocalGenerator::GetSourceFileWithOutput(
|
|
|
return nullptr;
|
|
|
}
|
|
|
|
|
|
+std::string cmLocalGenerator::CreateUtilityOutput(
|
|
|
+ std::string const& targetName)
|
|
|
+{
|
|
|
+ std::string force =
|
|
|
+ cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles/", targetName);
|
|
|
+ // The output is not actually created so mark it symbolic.
|
|
|
+ if (cmSourceFile* sf = this->Makefile->GetOrCreateGeneratedSource(force)) {
|
|
|
+ sf->SetProperty("SYMBOLIC", "1");
|
|
|
+ } else {
|
|
|
+ cmSystemTools::Error("Could not get source file entry for " + force);
|
|
|
+ }
|
|
|
+ return force;
|
|
|
+}
|
|
|
+
|
|
|
std::vector<cmCustomCommandGenerator>
|
|
|
cmLocalGenerator::MakeCustomCommandGenerators(cmCustomCommand const& cc,
|
|
|
std::string const& config)
|