summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-29 14:41:30 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-29 14:43:31 (GMT)
commitaaa322a5cb5603742273282fb12f1e368697a625 (patch)
tree03d9fb0e9d747fe2b52329ede5e4a7813efa55d5
parent98d6e9ec2dd0a935b1ebfed50b6e9ecab719557d (diff)
downloadCMake-aaa322a5cb5603742273282fb12f1e368697a625.zip
CMake-aaa322a5cb5603742273282fb12f1e368697a625.tar.gz
CMake-aaa322a5cb5603742273282fb12f1e368697a625.tar.bz2
cmMakefile: Return target from all AddUtilityCommand signatures
-rw-r--r--Source/cmMakefile.cxx23
-rw-r--r--Source/cmMakefile.h17
2 files changed, 21 insertions, 19 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 57e33df..17bde41 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1205,15 +1205,16 @@ cmMakefile::AddCustomCommandOldStyle(const std::string& target,
}
//----------------------------------------------------------------------------
-void cmMakefile::AddUtilityCommand(const std::string& utilityName,
- bool excludeFromAll,
- const std::vector<std::string>& depends,
- const char* workingDirectory,
- const char* command,
- const char* arg1,
- const char* arg2,
- const char* arg3,
- const char* arg4)
+cmTarget*
+cmMakefile::AddUtilityCommand(const std::string& utilityName,
+ bool excludeFromAll,
+ const std::vector<std::string>& depends,
+ const char* workingDirectory,
+ const char* command,
+ const char* arg1,
+ const char* arg2,
+ const char* arg3,
+ const char* arg4)
{
// Construct the command line for the custom command.
cmCustomCommandLine commandLine;
@@ -1238,8 +1239,8 @@ void cmMakefile::AddUtilityCommand(const std::string& utilityName,
commandLines.push_back(commandLine);
// Call the real signature of this method.
- this->AddUtilityCommand(utilityName, excludeFromAll, workingDirectory,
- depends, commandLines);
+ return this->AddUtilityCommand(utilityName, excludeFromAll, workingDirectory,
+ depends, commandLines);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 7938fcc..4fa5822 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -194,14 +194,15 @@ public:
* Add a utility to the build. A utiltity target is a command that
* is run every time the target is built.
*/
- void AddUtilityCommand(const std::string& utilityName, bool excludeFromAll,
- const std::vector<std::string>& depends,
- const char* workingDirectory,
- const char* command,
- const char* arg1=0,
- const char* arg2=0,
- const char* arg3=0,
- const char* arg4=0);
+ cmTarget* AddUtilityCommand(const std::string& utilityName,
+ bool excludeFromAll,
+ const std::vector<std::string>& depends,
+ const char* workingDirectory,
+ const char* command,
+ const char* arg1=0,
+ const char* arg2=0,
+ const char* arg3=0,
+ const char* arg4=0);
cmTarget* AddUtilityCommand(const std::string& utilityName,
bool excludeFromAll,
const char* workingDirectory,