diff options
author | Brad King <brad.king@kitware.com> | 2006-09-28 20:40:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-09-28 20:40:35 (GMT) |
commit | 9a1d4e92eb6347dbe6d03cc861e284f6a4da5a6a (patch) | |
tree | 62bbc9236a49a4f235b010bd433745a7a7870f68 /Source/cmMakefile.cxx | |
parent | 7d2de52c1a617a8a559e5c749ce5e6abd3739f01 (diff) | |
download | CMake-9a1d4e92eb6347dbe6d03cc861e284f6a4da5a6a.zip CMake-9a1d4e92eb6347dbe6d03cc861e284f6a4da5a6a.tar.gz CMake-9a1d4e92eb6347dbe6d03cc861e284f6a4da5a6a.tar.bz2 |
BUG: Fix/cleanup custom commands and custom targets. Make empty comment strings work. Fix ZERO_CHECK target always out of date for debugging. Fix Makefile driving of custom commands in a custom target. Fix dependencies on custom targets not in ALL in VS generators.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 18 |
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 = |