diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-01-02 11:08:02 -0500 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-01-02 11:08:02 -0500 |
commit | ff04863d9d2edd2513a9a3764aa99e5a388be6fa (patch) | |
tree | 8638dd0aafcc0d0a73876061dee56692b156a719 /Source/cmAuxSourceDirectoryCommand.cxx | |
parent | c7de81f9a6ac76904c08f8baf82c815cb01f012f (diff) | |
download | cmake-ff04863d9d2edd2513a9a3764aa99e5a388be6fa.tar.gz |
BUG: fix for bug 6197, absolute paths were not supported
Diffstat (limited to 'Source/cmAuxSourceDirectoryCommand.cxx')
-rw-r--r-- | Source/cmAuxSourceDirectoryCommand.cxx | 14 |
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()); |