summaryrefslogtreecommitdiff
path: root/Source/cmAuxSourceDirectoryCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-01-02 11:08:02 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2008-01-02 11:08:02 -0500
commitff04863d9d2edd2513a9a3764aa99e5a388be6fa (patch)
tree8638dd0aafcc0d0a73876061dee56692b156a719 /Source/cmAuxSourceDirectoryCommand.cxx
parentc7de81f9a6ac76904c08f8baf82c815cb01f012f (diff)
downloadcmake-ff04863d9d2edd2513a9a3764aa99e5a388be6fa.tar.gz
BUG: fix for bug 6197, absolute paths were not supported
Diffstat (limited to 'Source/cmAuxSourceDirectoryCommand.cxx')
-rw-r--r--Source/cmAuxSourceDirectoryCommand.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx
index 705aad7cf7..321dcef96c 100644
--- a/Source/cmAuxSourceDirectoryCommand.cxx
+++ b/Source/cmAuxSourceDirectoryCommand.cxx
@@ -32,9 +32,17 @@ bool cmAuxSourceDirectoryCommand::InitialPass
std::string sourceListValue;
std::string templateDirectory = args[0];
this->Makefile->AddExtraDirectory(templateDirectory.c_str());
- std::string tdir = this->Makefile->GetCurrentDirectory();
- tdir += "/";
- tdir += templateDirectory;
+ std::string tdir;
+ if(!cmSystemTools::FileExists(templateDirectory.c_str()))
+ {
+ tdir = this->Makefile->GetCurrentDirectory();
+ tdir += "/";
+ tdir += templateDirectory;
+ }
+ else
+ {
+ tdir = templateDirectory;
+ }
// was the list already populated
const char *def = this->Makefile->GetDefinition(args[1].c_str());