summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-03-09 21:28:44 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-03-09 21:28:44 (GMT)
commitddb815c12542f80f42562877298a73fab39bb4ca (patch)
tree825a90988e4710274a656b8f9bf7f32b7d0827fa /Source/cmLocalUnixMakefileGenerator.cxx
parentbf699505bc7fc378abf07ec4dfa0f0cc4fb89686 (diff)
downloadCMake-ddb815c12542f80f42562877298a73fab39bb4ca.zip
CMake-ddb815c12542f80f42562877298a73fab39bb4ca.tar.gz
CMake-ddb815c12542f80f42562877298a73fab39bb4ca.tar.bz2
ENH: add new subdirectory exclude from top option
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx29
1 files changed, 16 insertions, 13 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index 936555e..3ca70d8 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -1996,7 +1996,7 @@ OutputSubDirectoryVars(std::ostream& fout,
const char* target1,
const char* target2,
const char* depend,
- const std::vector<std::string>& SubDirectories,
+ const std::vector<std::pair<cmStdString, bool> >& SubDirectories,
bool silent)
{
if(!depend)
@@ -2008,26 +2008,29 @@ OutputSubDirectoryVars(std::ostream& fout,
return;
}
fout << "# Variable for making " << target << " in subdirectories.\n";
- fout << var << " = \\\n";
+ fout << var << " = ";
unsigned int ii;
for(ii =0; ii < SubDirectories.size(); ii++)
{
- std::string subdir = FixDirectoryName(SubDirectories[ii].c_str());
- fout << target << "_" << subdir.c_str();
- if(ii == SubDirectories.size()-1)
+ if(!SubDirectories[ii].second)
{
- fout << " \n\n";
- }
- else
- {
- fout << " \\\n";
+ continue;
}
+ fout << " \\\n";
+ std::string subdir = FixDirectoryName(SubDirectories[ii].first.c_str());
+ fout << target << "_" << subdir.c_str();
}
+ fout << " \n\n";
+
fout << "# Targets for making " << target << " in subdirectories.\n";
std::string last = "";
for(unsigned int cc =0; cc < SubDirectories.size(); cc++)
{
- std::string subdir = FixDirectoryName(SubDirectories[cc].c_str());
+ if(!SubDirectories[cc].second)
+ {
+ continue;
+ }
+ std::string subdir = FixDirectoryName(SubDirectories[cc].first.c_str());
fout << target << "_" << subdir.c_str() << ": " << depend;
// Make each subdirectory depend on previous one. This forces
@@ -2042,7 +2045,7 @@ OutputSubDirectoryVars(std::ostream& fout,
last = subdir;
std::string dir = m_Makefile->GetCurrentOutputDirectory();
dir += "/";
- dir += SubDirectories[cc];
+ dir += SubDirectories[cc].first;
this->BuildInSubDirectory(fout, dir.c_str(),
target1, target2, silent);
}
@@ -2054,7 +2057,7 @@ OutputSubDirectoryVars(std::ostream& fout,
void cmLocalUnixMakefileGenerator::OutputSubDirectoryRules(std::ostream& fout)
{
// Output Sub directory build rules
- const std::vector<std::string>& SubDirectories
+ const std::vector<std::pair<cmStdString, bool> >& SubDirectories
= m_Makefile->GetSubDirectories();
if( SubDirectories.size() == 0)