From 6208c285c8ae43d566474f488a00967b74ee4389 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 21 Mar 2014 22:27:59 -0400 Subject: cmMakefile: Defer dependency calculations --- Source/cmMakefile.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 452d3f6..2218e2f 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1056,16 +1056,16 @@ cmMakefile::AddCustomCommandToOutput(const std::vector& outputs, } } - // Construct a complete list of dependencies. - std::vector depends2(depends); - if(!main_dependency.empty()) - { - depends2.push_back(main_dependency); - } - // Attach the custom command to the file. if(file) { + // Construct a complete list of dependencies. + std::vector depends2(depends); + if(!main_dependency.empty()) + { + depends2.push_back(main_dependency); + } + cmCustomCommand* cc = new cmCustomCommand(this, outputs, depends2, commandLines, comment, workingDir); -- cgit v0.12