summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-04 22:10:30 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-04 22:10:30 (GMT)
commit5a6b0792cd5b3dd16b8a94091db15e02e9b4a00b (patch)
tree0555eb82a57d07bddefdfb3cf3760f1042fa763d /Source/cmMakefile.cxx
parent168591e72dd3d67ae2ced24582e6b117a9a2ac4f (diff)
downloadCMake-5a6b0792cd5b3dd16b8a94091db15e02e9b4a00b.zip
CMake-5a6b0792cd5b3dd16b8a94091db15e02e9b4a00b.tar.gz
CMake-5a6b0792cd5b3dd16b8a94091db15e02e9b4a00b.tar.bz2
ENH: Added COMMENT option to ADD_CUSTOM_TARGET. This addresses bug#3461.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 52a9127..226f5d5 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -823,7 +823,7 @@ void cmMakefile::AddUtilityCommand(const char* utilityName, bool all,
const char* workingDirectory,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines,
- bool escapeOldStyle)
+ bool escapeOldStyle, const char* comment)
{
// Create a target instance for this utility.
cmTarget target;
@@ -831,17 +831,22 @@ void cmMakefile::AddUtilityCommand(const char* utilityName, bool all,
target.SetInAll(all);
target.SetMakefile(this);
+ if(!comment)
+ {
+ // Use an empty comment to avoid generation of default comment.
+ comment = "";
+ }
+
// Store the custom command in the target.
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,
+ commandLines, comment,
workingDirectory, no_replace,
escapeOldStyle);
target.GetSourceLists().push_back(force);