diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-03-14 16:29:15 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-03-14 16:29:15 (GMT) |
commit | 791aa6052b9033e89645b324b1c99222936981df (patch) | |
tree | fdd95f48321d8074e4c97eaba0b03da3e885d409 /Source/cmLocalUnixMakefileGenerator2.cxx | |
parent | f7c024df2a2ae6b8cf5ba127ee764a55f81f06e6 (diff) | |
download | CMake-791aa6052b9033e89645b324b1c99222936981df.zip CMake-791aa6052b9033e89645b324b1c99222936981df.tar.gz CMake-791aa6052b9033e89645b324b1c99222936981df.tar.bz2 |
ENH: add support for out of source source
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator2.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator2.cxx | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx index 58dbee8..3d0c577 100644 --- a/Source/cmLocalUnixMakefileGenerator2.cxx +++ b/Source/cmLocalUnixMakefileGenerator2.cxx @@ -21,6 +21,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmSubDirectory.h" #include "cmake.h" // Include dependency scanners for supported languages. Only the @@ -1313,23 +1314,24 @@ cmLocalUnixMakefileGenerator2 // boolean is true should be included. Keep track of the last // pre-order and last post-order rule created so that ordering can // be enforced. - const std::vector<std::pair<cmStdString, bool> >& - subdirs = m_Makefile->GetSubDirectories(); + const std::vector<cmSubDirectory>& subdirs = m_Makefile->GetSubDirectories(); std::string lastPre = ""; std::string lastPost = ""; - for(std::vector<std::pair<cmStdString, bool> >::const_iterator + for(std::vector<cmSubDirectory>::const_iterator i = subdirs.begin(); i != subdirs.end(); ++i) { - if(i->second) + if(i->IncludeTopLevel) { // Add the subdirectory rule either for pre-order or post-order. - if(m_Makefile->IsDirectoryPreOrder(i->first.c_str())) + if(i->PreOrder) { - this->WriteSubdirRule(makefileStream, pass, i->first.c_str(), lastPre); + this->WriteSubdirRule(makefileStream, pass, + i->BinaryPath.c_str(), lastPre); } else { - this->WriteSubdirRule(makefileStream, pass, i->first.c_str(), lastPost); + this->WriteSubdirRule(makefileStream, pass, + i->BinaryPath.c_str(), lastPost); } } } @@ -1366,11 +1368,8 @@ cmLocalUnixMakefileGenerator2 // Change back to the starting directory. Any trailing slash must // be removed to avoid problems with Borland Make. - std::string destFull = m_Makefile->GetStartOutputDirectory(); - destFull += "/"; - destFull += subdir; std::string back = - cmSystemTools::RelativePath(destFull.c_str(), + cmSystemTools::RelativePath(subdir, m_Makefile->GetStartOutputDirectory()); if(back.size() && back[back.size()-1] == '/') { @@ -2254,6 +2253,13 @@ cmLocalUnixMakefileGenerator2 { s.replace(pos, 1, "_"); } + + // Replace ":" drive specifier with a single underscore + while((pos = s.find(':')) != std::string::npos) + { + s.replace(pos, 1, "_"); + } + return s; } |