diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-28 18:01:21 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-28 18:01:21 (GMT) |
commit | 1b9a530ef4c3ce07c54667476f150d0a156430e6 (patch) | |
tree | c86ae7016f15c98378883da34102b067ae766b80 /Source/cmSourceFilesCommand.cxx | |
parent | d1b419b7beb3dbcc8b999eadd990972b76311373 (diff) | |
download | CMake-1b9a530ef4c3ce07c54667476f150d0a156430e6.zip CMake-1b9a530ef4c3ce07c54667476f150d0a156430e6.tar.gz CMake-1b9a530ef4c3ce07c54667476f150d0a156430e6.tar.bz2 |
BUG: find files in subdirectories
Diffstat (limited to 'Source/cmSourceFilesCommand.cxx')
-rw-r--r-- | Source/cmSourceFilesCommand.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmSourceFilesCommand.cxx b/Source/cmSourceFilesCommand.cxx index 63ce45c..bc39fc5 100644 --- a/Source/cmSourceFilesCommand.cxx +++ b/Source/cmSourceFilesCommand.cxx @@ -56,15 +56,16 @@ bool cmSourceFilesCommand::InitialPass(std::vector<std::string>& args) cmSourceFile file; file.SetIsAnAbstractClass(false); std::string path = cmSystemTools::GetFilenamePath(copy); - if (path == "") + // if this is a full path then + if((path.size() && path[0] == '/') || + (path.size() > 1 && path[1] == ':')) { file.SetName(cmSystemTools::GetFilenameName(copy.c_str()).c_str(), - m_Makefile->GetCurrentDirectory()); + path.c_str()); } else { - file.SetName(cmSystemTools::GetFilenameName(copy.c_str()).c_str(), - path.c_str()); + file.SetName(i->c_str(), m_Makefile->GetCurrentDirectory()); } m_Makefile->AddSource(file, args[0].c_str()); } |