diff options
author | Berk Geveci <berk.geveci@kitware.com> | 2001-06-27 21:19:11 (GMT) |
---|---|---|
committer | Berk Geveci <berk.geveci@kitware.com> | 2001-06-27 21:19:11 (GMT) |
commit | b6121bf8a8146fef5ba29ab6c38749fa27904073 (patch) | |
tree | 05fd5b1c7a770de2a306aa3cfbaa44ebcf29adbe /Source/cmSourceFilesCommand.cxx | |
parent | 2a7fc5750b338062c4d795bbfb31aa7120da9818 (diff) | |
download | CMake-b6121bf8a8146fef5ba29ab6c38749fa27904073.zip CMake-b6121bf8a8146fef5ba29ab6c38749fa27904073.tar.gz CMake-b6121bf8a8146fef5ba29ab6c38749fa27904073.tar.bz2 |
Added variable expansion.
Diffstat (limited to 'Source/cmSourceFilesCommand.cxx')
-rw-r--r-- | Source/cmSourceFilesCommand.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmSourceFilesCommand.cxx b/Source/cmSourceFilesCommand.cxx index 0d12c3d..63ce45c 100644 --- a/Source/cmSourceFilesCommand.cxx +++ b/Source/cmSourceFilesCommand.cxx @@ -51,9 +51,21 @@ bool cmSourceFilesCommand::InitialPass(std::vector<std::string>& args) for(std::vector<std::string>::iterator i = (args.begin() + 1); i != args.end(); ++i) { + std::string copy = *i; + m_Makefile->ExpandVariablesInString(copy); cmSourceFile file; file.SetIsAnAbstractClass(false); - file.SetName((*i).c_str(), m_Makefile->GetCurrentDirectory()); + std::string path = cmSystemTools::GetFilenamePath(copy); + if (path == "") + { + file.SetName(cmSystemTools::GetFilenameName(copy.c_str()).c_str(), + m_Makefile->GetCurrentDirectory()); + } + else + { + file.SetName(cmSystemTools::GetFilenameName(copy.c_str()).c_str(), + path.c_str()); + } m_Makefile->AddSource(file, args[0].c_str()); } return true; |