summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-05-09 12:51:54 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-05-09 12:51:54 (GMT)
commitcb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3 (patch)
tree51c7f3ea41957a192cf95366a123cd3d53df735e /Source/cmSourceFile.cxx
parenta74d8698eb67337fafe48d2359a9e1bfaa8b1272 (diff)
downloadCMake-cb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3.zip
CMake-cb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3.tar.gz
CMake-cb6bc6f0aa254a0eb5910aa5a9a36ee1c15f46e3.tar.bz2
added load cache command and fixed source file
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 380b95e..963f77c 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -51,13 +51,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
void cmSourceFile::SetName(const char* name, const char* dir)
{
m_HeaderFileOnly = true;
+
m_SourceName = name;
std::string pathname = dir;
+
+ // the name might include the full path already, so
+ // check for this case
+ if (name && (name[0] == '/' ||
+ (name[0] != '\0' && name[1] == ':')))
+ {
+ pathname = "";
+ }
if(pathname != "")
{
pathname += "/";
}
-
+
+
// First try and see whether the listed file can be found
// as is without extensions added on.
pathname += m_SourceName;