summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsC.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-05-03 14:07:08 (GMT)
committerBrad King <brad.king@kitware.com>2006-05-03 14:07:08 (GMT)
commit826d238ebd644be6e1ea00363e76ecba7699a649 (patch)
treefb444959534d8bd1af678dee9b43cf185e96bee4 /Source/cmDependsC.cxx
parent0cfda4a7f09825c8852d5763a91097841612cda3 (diff)
downloadCMake-826d238ebd644be6e1ea00363e76ecba7699a649.zip
CMake-826d238ebd644be6e1ea00363e76ecba7699a649.tar.gz
CMake-826d238ebd644be6e1ea00363e76ecba7699a649.tar.bz2
BUG: Fix to avoid repeated calls to CollapseFullPath during dependency scanning. This addresses bug#3191.
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r--Source/cmDependsC.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 2e198ee..13ebdcd 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -26,7 +26,6 @@ cmDependsC::cmDependsC():
IncludePath(0), GeneratedFiles(0)
{
}
-
//----------------------------------------------------------------------------
// yummy look at all those constructor arguments
cmDependsC::cmDependsC(std::vector<std::string> const& includes,
@@ -85,6 +84,7 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
this->Encountered.insert(src);
std::set<cmStdString> dependencies;
std::set<cmStdString> scanned;
+
while(!this->Unscanned.empty())
{
// Get the next file to scan.
@@ -367,9 +367,10 @@ bool cmDependsC::FileExistsOrIsGenerated(const std::string& fname,
else if(cmSystemTools::FileIsFullPath(fname.c_str()))
{
// The generated file may have been listed with a relative path.
- std::string dir = cmSystemTools::CollapseFullPath(this->Directory.c_str());
+ // Note that CMAKE_GENERATED_FILES is written with a conversion
+ // relative to the home output directory.
std::string rname =
- cmSystemTools::RelativePath(dir.c_str(), fname.c_str());
+ cmSystemTools::RelativePath(this->HomeOutputDirectory.c_str(), fname.c_str());
if(this->FileIsGenerated(rname, scanned, dependencies))
{
return true;