summaryrefslogtreecommitdiffstats
path: root/Source/cmAddCustomCommandCommand.cxx
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-12 21:20:13 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-13 15:00:21 (GMT)
commit5d28e361b709a781a131cb9d9da73f04484eff54 (patch)
treee1fcb55ac14cc7f4d848646fd638b3b2cecaee20 /Source/cmAddCustomCommandCommand.cxx
parent4fb29850ad325b70fb412d4fd596c0a0d627ae8b (diff)
downloadCMake-5d28e361b709a781a131cb9d9da73f04484eff54.zip
CMake-5d28e361b709a781a131cb9d9da73f04484eff54.tar.gz
CMake-5d28e361b709a781a131cb9d9da73f04484eff54.tar.bz2
add_custom_command: Move append functionality into class cmMakefile
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 2a0db45..90317bd 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -13,7 +13,6 @@
#include "cmMakefile.h"
#include "cmMessageType.h"
#include "cmPolicies.h"
-#include "cmSourceFile.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
@@ -317,14 +316,9 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
// Check for an append request.
if (append) {
- // Lookup an existing command.
- if (cmSourceFile* sf = mf.GetSourceFileWithOutput(output[0])) {
- if (cmCustomCommand* cc = sf->GetCustomCommand()) {
- cc->AppendCommands(commandLines);
- cc->AppendDepends(depends);
- cc->AppendImplicitDepends(implicit_depends);
- return true;
- }
+ if (mf.AppendCustomCommandToOutput(output[0], depends, implicit_depends,
+ commandLines)) {
+ return true;
}
// No command for this output exists.