summaryrefslogtreecommitdiffstats
path: root/Source/cmMakeDepend.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-06-27 19:57:09 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-06-27 19:57:09 (GMT)
commit44a7cd55ff126412d8ba8b82739a1bee132c62a1 (patch)
tree533de5563331136062407c254c05024bb5b91632 /Source/cmMakeDepend.cxx
parenta1a05a5fbcd0d34aa5ab0dde7da2ba4c5082916a (diff)
downloadCMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.zip
CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.tar.gz
CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.tar.bz2
removed all source lists from the system and made them vectors. Also appended _CMAKE_PATH to the end of the automatic cache entries for executables and libraries. Odds of all these changes working are slim but cmake builds and passes all its tests. VTK40 starts building
Diffstat (limited to 'Source/cmMakeDepend.cxx')
-rw-r--r--Source/cmMakeDepend.cxx44
1 files changed, 20 insertions, 24 deletions
diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx
index b56f26a..ab1b090 100644
--- a/Source/cmMakeDepend.cxx
+++ b/Source/cmMakeDepend.cxx
@@ -143,39 +143,35 @@ void cmMakeDepend::GenerateDependInformation(cmDependInformation* info)
if(!found)
{
// Try to find the file amongst the sources
- cmMakefile::SourceMap srcmap = m_Makefile->GetSources();
- cmMakefile::SourceMap::iterator l;
- for (l= srcmap.begin() ; l!=srcmap.end() ; l++)
+ cmSourceFile *srcFile =
+ m_Makefile->GetSource(cmSystemTools::GetFilenameWithoutExtension(path).c_str());
+ if (srcFile)
{
- for(std::vector<cmSourceFile*>::iterator i = l->second.begin();
- i != l->second.end(); i++)
+ if (srcFile->GetFullPath() == path)
{
- if ((*i)->GetFullPath() == path)
- {
- found=true;
- }
- else
- {
- //try to guess which include path to use
- for(std::vector<std::string>::iterator t =
+ found=true;
+ }
+ else
+ {
+ //try to guess which include path to use
+ for(std::vector<std::string>::iterator t =
m_IncludeDirectories.begin();
- t != m_IncludeDirectories.end(); ++t)
+ t != m_IncludeDirectories.end(); ++t)
+ {
+ std::string incpath = *t;
+ incpath = incpath + "/";
+ incpath = incpath + path;
+ if (srcFile->GetFullPath() == incpath)
{
- std::string incpath = *t;
- incpath = incpath + "/";
- incpath = incpath + path;
- if ((*i)->GetFullPath() == incpath)
- {
- // set the path to the guessed path
- info->m_FullPath = incpath;
- found=true;
- }
+ // set the path to the guessed path
+ info->m_FullPath = incpath;
+ found=true;
}
}
}
}
}
-
+
if(!found)
{
// Couldn't find any dependency information.