diff options
author | Brad King <brad.king@kitware.com> | 2005-02-24 17:44:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-02-24 17:44:56 (GMT) |
commit | 9c4997bf06361b05ddad6d23388086b012d381fb (patch) | |
tree | 123da1ae1f86f5879791a9518b3322d346b63acd /Source/cmDependsC.cxx | |
parent | b40745c925eb931d4044596018cd5079b8456ab7 (diff) | |
download | CMake-9c4997bf06361b05ddad6d23388086b012d381fb.zip CMake-9c4997bf06361b05ddad6d23388086b012d381fb.tar.gz CMake-9c4997bf06361b05ddad6d23388086b012d381fb.tar.bz2 |
BUG: Avoid putting a leading ./ on the dependency names.
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r-- | Source/cmDependsC.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 94ef801..d77d842 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -90,9 +90,20 @@ bool cmDependsC::WriteDependencies(std::ostream& os) for(std::vector<std::string>::const_iterator i = m_IncludePath->begin(); i != m_IncludePath->end(); ++i) { + // Construct the name of the file as if it were in the current + // include directory. Avoid using a leading "./". std::string temp = *i; - temp += "/"; + if(temp == ".") + { + temp = ""; + } + else + { + temp += "/"; + } temp += fname; + + // Look for the file in this location. if(cmSystemTools::FileExists(temp.c_str())) { fullName = temp; |