diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-12 21:20:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-13 15:00:21 (GMT) |
commit | 5d28e361b709a781a131cb9d9da73f04484eff54 (patch) | |
tree | e1fcb55ac14cc7f4d848646fd638b3b2cecaee20 /Source/cmMakefile.cxx | |
parent | 4fb29850ad325b70fb412d4fd596c0a0d627ae8b (diff) | |
download | CMake-5d28e361b709a781a131cb9d9da73f04484eff54.zip CMake-5d28e361b709a781a131cb9d9da73f04484eff54.tar.gz CMake-5d28e361b709a781a131cb9d9da73f04484eff54.tar.bz2 |
add_custom_command: Move append functionality into class cmMakefile
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ec2e646..000d84b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1111,6 +1111,23 @@ void cmMakefile::AddCustomCommandOldStyle( } } +bool cmMakefile::AppendCustomCommandToOutput( + const std::string& output, const std::vector<std::string>& depends, + const cmImplicitDependsList& implicit_depends, + const cmCustomCommandLines& commandLines) +{ + // Lookup an existing command. + if (cmSourceFile* sf = this->GetSourceFileWithOutput(output)) { + if (cmCustomCommand* cc = sf->GetCustomCommand()) { + cc->AppendCommands(commandLines); + cc->AppendDepends(depends); + cc->AppendImplicitDepends(implicit_depends); + return true; + } + } + return false; +} + cmTarget* cmMakefile::AddUtilityCommand( const std::string& utilityName, TargetOrigin origin, bool excludeFromAll, const std::vector<std::string>& depends, const char* workingDirectory, |