|
|
@@ -50,10 +50,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
|
|
|
assert(snapshot.IsValid());
|
|
|
this->GlobalGenerator = gg;
|
|
|
this->Parent = parent;
|
|
|
- if (parent)
|
|
|
- {
|
|
|
- parent->AddChild(this);
|
|
|
- }
|
|
|
|
|
|
this->Makefile = new cmMakefile(this);
|
|
|
|
|
|
@@ -199,18 +195,16 @@ void cmLocalGenerator::GenerateTestFiles()
|
|
|
(*gi)->Compute(this);
|
|
|
(*gi)->Generate(fout, config, configurationTypes);
|
|
|
}
|
|
|
- if (!this->Children.empty())
|
|
|
+ size_t i;
|
|
|
+ std::vector<cmState::Snapshot> children
|
|
|
+ = this->Makefile->GetStateSnapshot().GetChildren();
|
|
|
+ for(i = 0; i < children.size(); ++i)
|
|
|
{
|
|
|
- size_t i;
|
|
|
- for(i = 0; i < this->Children.size(); ++i)
|
|
|
- {
|
|
|
- // TODO: Use add_subdirectory instead?
|
|
|
- fout << "subdirs(";
|
|
|
- std::string outP =
|
|
|
- this->Children[i]->GetMakefile()->GetCurrentBinaryDirectory();
|
|
|
- fout << this->Convert(outP,START_OUTPUT);
|
|
|
- fout << ")" << std::endl;
|
|
|
- }
|
|
|
+ // TODO: Use add_subdirectory instead?
|
|
|
+ fout << "subdirs(";
|
|
|
+ std::string outP = children[i].GetDirectory().GetCurrentBinary();
|
|
|
+ fout << this->Convert(outP,START_OUTPUT);
|
|
|
+ fout << ")" << std::endl;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -416,16 +410,18 @@ void cmLocalGenerator::GenerateInstallRules()
|
|
|
this->GenerateTargetInstallRules(fout, config, configurationTypes);
|
|
|
|
|
|
// Include install scripts from subdirectories.
|
|
|
- if(!this->Children.empty())
|
|
|
+ std::vector<cmState::Snapshot> children
|
|
|
+ = this->Makefile->GetStateSnapshot().GetChildren();
|
|
|
+ if(!children.empty())
|
|
|
{
|
|
|
fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n";
|
|
|
fout << " # Include the install script for each subdirectory.\n";
|
|
|
- for(std::vector<cmLocalGenerator*>::const_iterator
|
|
|
- ci = this->Children.begin(); ci != this->Children.end(); ++ci)
|
|
|
+ for(std::vector<cmState::Snapshot>::const_iterator
|
|
|
+ ci = children.begin(); ci != children.end(); ++ci)
|
|
|
{
|
|
|
- if(!(*ci)->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
|
|
+ if(!ci->GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
|
|
{
|
|
|
- std::string odir = (*ci)->GetMakefile()->GetCurrentBinaryDirectory();
|
|
|
+ std::string odir = ci->GetDirectory().GetCurrentBinary();
|
|
|
cmSystemTools::ConvertToUnixSlashes(odir);
|
|
|
fout << " include(\"" << odir
|
|
|
<< "/cmake_install.cmake\")" << std::endl;
|