summaryrefslogtreecommitdiffstats
path: root/Source/cmCableWrapTclCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-07-17 19:41:49 (GMT)
committerBrad King <brad.king@kitware.com>2001-07-17 19:41:49 (GMT)
commit21d634c525709fdeeb60d8542cdb323fa950fa58 (patch)
tree9fa62c7dacf1681896d6fb926f2bb45199d7c3e8 /Source/cmCableWrapTclCommand.cxx
parent7df455251b375adfb52da886f1f97339af675c8c (diff)
downloadCMake-21d634c525709fdeeb60d8542cdb323fa950fa58.zip
CMake-21d634c525709fdeeb60d8542cdb323fa950fa58.tar.gz
CMake-21d634c525709fdeeb60d8542cdb323fa950fa58.tar.bz2
ENH: Added generation of dependencies on the CMake-generated input to gcc-xml so that re-generation of wrappers will occur if a header changes.
Diffstat (limited to 'Source/cmCableWrapTclCommand.cxx')
-rw-r--r--Source/cmCableWrapTclCommand.cxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/Source/cmCableWrapTclCommand.cxx b/Source/cmCableWrapTclCommand.cxx
index cf65331..f9e7f05 100644
--- a/Source/cmCableWrapTclCommand.cxx
+++ b/Source/cmCableWrapTclCommand.cxx
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmCacheManager.h"
#include "cmTarget.h"
#include "cmGeneratedFileStream.h"
-
+#include "cmMakeDepend.h"
cmCableWrapTclCommand::cmCableWrapTclCommand():
m_CableClassSet(NULL)
@@ -256,6 +256,26 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
std::string command = this->GetGccXmlFromCache();
std::vector<std::string> depends;
depends.push_back(command);
+
+ // Get the dependencies of the file.
+ cmMakeDepend md;
+ md.SetMakefile(m_Makefile);
+ const cmDependInformation* dependInfo =
+ md.FindDependencies(classCxxName.c_str());
+ if(dependInfo)
+ {
+ for(cmDependInformation::DependencySet::const_iterator d =
+ dependInfo->m_DependencySet.begin();
+ d != dependInfo->m_DependencySet.end(); ++d)
+ {
+ // Make sure the full path is given. If not, the dependency was
+ // not found.
+ if((*d)->m_FullPath != "")
+ {
+ depends.push_back((*d)->m_FullPath);
+ }
+ }
+ }
std::string commandArgs = this->GetGccXmlFlagsFromCache();
commandArgs += " ";