diff options
author | Brad King <brad.king@kitware.com> | 2008-04-25 19:30:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-04-25 19:30:58 (GMT) |
commit | b69cfaf4124079c9cf59fabdae6d2a024fc07086 (patch) | |
tree | e474bebf7e1dcb16b7afc112bada68103b4f8d97 /Source/cmSourceFile.cxx | |
parent | 779a2abda354dc8b667ab0ad1c4d983d867f01e0 (diff) | |
download | CMake-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.cxx | 10 |
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"; |