diff options
author | Brad King <brad.king@kitware.com> | 2001-08-23 20:28:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-08-23 20:28:29 (GMT) |
commit | 852be8a520a8a03268b499642c5257675b9ad7f2 (patch) | |
tree | 01edd8e978706d268fa80a79bab27c40ea97c5ea /Source | |
parent | eff67f306121d8d9e21eaa4f623474d83d133c50 (diff) | |
download | CMake-852be8a520a8a03268b499642c5257675b9ad7f2.zip CMake-852be8a520a8a03268b499642c5257675b9ad7f2.tar.gz CMake-852be8a520a8a03268b499642c5257675b9ad7f2.tar.bz2 |
ENH: Each cmCableWrapTclCommand instance now uses a single cmMakeDepend object for dependencies for all the gccxml input files it generates. This should significantly improve generation time.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCableWrapTclCommand.cxx | 10 | ||||
-rw-r--r-- | Source/cmCableWrapTclCommand.h | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmCableWrapTclCommand.cxx b/Source/cmCableWrapTclCommand.cxx index 720fa07..03ee44a 100644 --- a/Source/cmCableWrapTclCommand.cxx +++ b/Source/cmCableWrapTclCommand.cxx @@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "cmMakeDepend.h" cmCableWrapTclCommand::cmCableWrapTclCommand(): - m_CableClassSet(NULL) + m_CableClassSet(NULL), m_MakeDepend(new cmMakeDepend) { } @@ -55,6 +55,7 @@ cmCableWrapTclCommand::~cmCableWrapTclCommand() { delete m_CableClassSet; } + delete m_MakeDepend; } @@ -113,6 +114,9 @@ bool cmCableWrapTclCommand::InitialPass(std::vector<std::string>& args) */ void cmCableWrapTclCommand::GenerateCableFiles() const { + // Make sure the dependency generator is ready to go. + m_MakeDepend->SetMakefile(m_Makefile); + // Each wrapped class may have an associated "tag" that represents // an alternative name without funky C++ syntax in it. This makes // it easier to refer to the class in a Tcl script. We will also @@ -320,10 +324,8 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name, depends.push_back(command); // Get the dependencies of the file. - cmMakeDepend md; - md.SetMakefile(m_Makefile); const cmDependInformation* dependInfo = - md.FindDependencies(classCxxName.c_str()); + m_MakeDepend->FindDependencies(classCxxName.c_str()); if(dependInfo) { for(cmDependInformation::DependencySet::const_iterator d = diff --git a/Source/cmCableWrapTclCommand.h b/Source/cmCableWrapTclCommand.h index bb35ac8..ae50716 100644 --- a/Source/cmCableWrapTclCommand.h +++ b/Source/cmCableWrapTclCommand.h @@ -45,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "cmCommand.h" #include "cmCableClassSet.h" +class cmMakeDepend; + /** \class cmCableWrapTclCommand * \brief Define a command that wraps a set of classes in Tcl. */ @@ -119,6 +121,9 @@ private: * added to the makefile as another set. */ cmCableClassSet* m_CableClassSet; + + ///! The dependency generator. + cmMakeDepend* m_MakeDepend; }; #endif |