summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-16 18:30:19 (GMT)
committerBrad King <brad.king@kitware.com>2009-03-16 18:30:19 (GMT)
commit147d6f31015a64b3ec1b3799d4c0047942b27999 (patch)
tree2c7c1757d5fb75ef448a42c3ec761636ddea7760 /Source
parent9862f383d09018cd9e14a6054c03b508c0ef3afa (diff)
downloadCMake-147d6f31015a64b3ec1b3799d4c0047942b27999.zip
CMake-147d6f31015a64b3ec1b3799d4c0047942b27999.tar.gz
CMake-147d6f31015a64b3ec1b3799d4c0047942b27999.tar.bz2
ENH: Remove unused code from cmMakeDepend
This class is the old-style dependency scanner. It is needed only to implement the output_required_files command. This change removes some code not needed for that purpose, including a reference to the HEADER_FILE_ONLY property.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakeDepend.cxx58
-rw-r--r--Source/cmMakeDepend.h19
2 files changed, 1 insertions, 76 deletions
diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx
index 61cb443..08d8d69 100644
--- a/Source/cmMakeDepend.cxx
+++ b/Source/cmMakeDepend.cxx
@@ -264,30 +264,6 @@ cmDependInformation* cmMakeDepend::GetDependInformation(const char* file,
}
-void cmMakeDepend::GenerateMakefileDependencies()
-{
- // Now create cmDependInformation objects for files in the directory
- cmTargets &tgts = this->Makefile->GetTargets();
- for(cmTargets::iterator l = tgts.begin();
- l != tgts.end(); l++)
- {
- const std::vector<cmSourceFile*> &classes = l->second.GetSourceFiles();
- for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
- i != classes.end(); ++i)
- {
- if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
- {
- cmDependInformation* info =
- this->GetDependInformation((*i)->GetFullPath().c_str(),0);
- this->AddFileToSearchPath(info->FullPath.c_str());
- info->SourceFile = *i;
- this->GenerateDependInformation(info);
- }
- }
- }
-}
-
-
// find the full path to fname by searching the this->IncludeDirectories array
std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
{
@@ -362,37 +338,3 @@ void cmMakeDepend::AddSearchPath(const char* path)
{
this->IncludeDirectories.push_back(path);
}
-
-// Add a directory to the search path
-void cmMakeDepend::AddFileToSearchPath(const char* file)
-{
- std::string filepath = file;
- std::string::size_type pos = filepath.rfind('/');
- if(pos != std::string::npos)
- {
- std::string path = filepath.substr(0, pos);
- if(std::find(this->IncludeDirectories.begin(),
- this->IncludeDirectories.end(), path)
- == this->IncludeDirectories.end())
- {
- this->IncludeDirectories.push_back(path);
- return;
- }
- }
-}
-
-const cmDependInformation*
-cmMakeDepend::GetDependInformationForSourceFile(const cmSourceFile &sf) const
-{
- for(DependInformationMapType::const_iterator i =
- this->DependInformationMap.begin();
- i != this->DependInformationMap.end(); ++i)
- {
- const cmDependInformation* info = i->second;
- if(info->SourceFile == &sf)
- {
- return info;
- }
- }
- return 0;
-}
diff --git a/Source/cmMakeDepend.h b/Source/cmMakeDepend.h
index 1c91663..3b4f653 100644
--- a/Source/cmMakeDepend.h
+++ b/Source/cmMakeDepend.h
@@ -96,35 +96,18 @@ public:
*/
virtual void SetMakefile(cmMakefile* makefile);
- /**
- * Get the depend info struct for a source file
- */
- const cmDependInformation
- *GetDependInformationForSourceFile(const cmSourceFile &sf) const;
-
/**
* Add a directory to the search path for include files.
*/
virtual void AddSearchPath(const char*);
/**
- * Generate dependencies for all the sources of all the targets
- * in the makefile.
- */
- void GenerateMakefileDependencies();
-
- /**
* Generate dependencies for the file given. Returns a pointer to
* the cmDependInformation object for the file.
*/
const cmDependInformation* FindDependencies(const char* file);
-protected:
- /**
- * Add a source file to the search path.
- */
- void AddFileToSearchPath(const char* filepath);
-
+protected:
/**
* Compute the depend information for this class.
*/