summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-04-25 19:30:58 (GMT)
committerBrad King <brad.king@kitware.com>2008-04-25 19:30:58 (GMT)
commitb69cfaf4124079c9cf59fabdae6d2a024fc07086 (patch)
treee474bebf7e1dcb16b7afc112bada68103b4f8d97 /Source/cmSourceFile.cxx
parent779a2abda354dc8b667ab0ad1c4d983d867f01e0 (diff)
downloadCMake-b69cfaf4124079c9cf59fabdae6d2a024fc07086.zip
CMake-b69cfaf4124079c9cf59fabdae6d2a024fc07086.tar.gz
CMake-b69cfaf4124079c9cf59fabdae6d2a024fc07086.tar.bz2
BUG: Trust user-provided source file full paths.
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 1cc2b2c..da2e79a 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -167,6 +167,16 @@ bool cmSourceFile::FindFullPath()
}
}
+ // If the user provided a full path, trust it. If the file is not
+ // there the native tool will complain at build time.
+ if(!this->Location.DirectoryIsAmbiguous())
+ {
+ this->FullPath = this->Location.GetDirectory();
+ this->FullPath += "/";
+ this->FullPath += this->Location.GetName();
+ return true;
+ }
+
cmOStringStream e;
e << "Cannot find source file \"" << this->Location.GetName() << "\"";
e << "\n\nTried extensions";