summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-09-17 14:50:46 (GMT)
committerBrad King <brad.king@kitware.com>2007-09-17 14:50:46 (GMT)
commitd7a5d4c191b503f0d30abf9fbf0672370157c430 (patch)
tree225cd10e9967d49c05142e1dc8e938177114101b /Source/cmMakefileTargetGenerator.cxx
parent267fd538d837d40e7ed865326899e0105265a515 (diff)
downloadCMake-d7a5d4c191b503f0d30abf9fbf0672370157c430.zip
CMake-d7a5d4c191b503f0d30abf9fbf0672370157c430.tar.gz
CMake-d7a5d4c191b503f0d30abf9fbf0672370157c430.tar.bz2
ENH: Added IMPLICIT_DEPENDS option to ADD_CUSTOM_COMMAND. It currently works only for Makefile generators. It allows a custom command to have implicit dependencies in the form of C or CXX sources.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index b2b3fa1..569d761 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -939,6 +939,21 @@ void cmMakefileTargetGenerator
}
this->GenerateExtraOutput(o->c_str(), in, symbolic);
}
+
+ // Setup implicit dependency scanning.
+ for(cmCustomCommand::ImplicitDependsList::const_iterator
+ idi = cc.GetImplicitDepends().begin();
+ idi != cc.GetImplicitDepends().end(); ++idi)
+ {
+ std::string objFullPath =
+ this->Convert(outputs[0].c_str(), cmLocalGenerator::FULL);
+ std::string srcFullPath =
+ this->Convert(idi->second.c_str(), cmLocalGenerator::FULL);
+ this->LocalGenerator->
+ AddImplicitDepends(*this->Target, idi->first.c_str(),
+ objFullPath.c_str(),
+ srcFullPath.c_str());
+ }
}
//----------------------------------------------------------------------------