summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d99182c..8ad4139 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -830,11 +830,21 @@ void cmMakefile::AddUtilityCommand(const char* utilityName, bool all,
target.SetType(cmTarget::UTILITY, utilityName);
target.SetInAll(all);
target.SetMakefile(this);
+
// Store the custom command in the target.
- std::vector<std::string> outputs;
- cmCustomCommand cc(outputs, depends, commandLines, 0, workingDirectory);
- cc.SetEscapeOldStyle(escapeOldStyle);
- target.GetPostBuildCommands().push_back(cc);
+ std::string force = this->GetStartOutputDirectory();
+ force += cmake::GetCMakeFilesDirectory();
+ force += "/";
+ force += utilityName;
+ const char* no_main_dependency = 0;
+ const char* empty_comment = "";
+ bool no_replace = false;
+ this->AddCustomCommandToOutput(force.c_str(), depends,
+ no_main_dependency,
+ commandLines, empty_comment,
+ workingDirectory, no_replace,
+ escapeOldStyle);
+ target.GetSourceLists().push_back(force);
// Add the target to the set of targets.
cmTargets::iterator it =