diff options
author | Brad King <brad.king@kitware.com> | 2007-05-28 15:16:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-05-28 15:16:50 (GMT) |
commit | 60f02a27dbdee46bb10d777c4af9991507815066 (patch) | |
tree | d0d4c0b077021ce68564ea2c7c1a38b02ee1c7f9 /Source | |
parent | 0fa1bd2f71ea6f5474709729966b9df8a9a05e99 (diff) | |
download | CMake-60f02a27dbdee46bb10d777c4af9991507815066.zip CMake-60f02a27dbdee46bb10d777c4af9991507815066.tar.gz CMake-60f02a27dbdee46bb10d777c4af9991507815066.tar.bz2 |
ENH: Remove unused build rules from Xcode. This change was made in the VS generators on 2006-03-23 and should have been made for the Xcode generator too. Also commented out some debug print statements.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index ab00af4..3354e59 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -772,7 +772,7 @@ void cmGlobalXCodeGenerator::AddFrameworkPhases(cmTarget* target, cmXCodeObject* xsf = this->CreateXCodeSourceFile(this->CurrentLocalGenerator, sf, *target); - std::cerr << "copy header " << sf->GetFullPath() << "\n"; + //std::cerr << "copy header " << sf->GetFullPath() << "\n"; headersToCopy->AddObject(xsf); } } @@ -1515,7 +1515,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, install_name_dir = install_name_dir + "/.."; install_name_dir = cmSystemTools::CollapseFullPath(install_name_dir.c_str()); - std::cerr << "new install name " << install_name_dir << "\n"; + //std::cerr << "new install name " << install_name_dir << "\n"; } } @@ -2513,9 +2513,7 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root, { return; } -#if 1 - // TODO: This block should be moved to a central location for all - // generators. It is duplicated in every generator. + // Skip local generators that are excluded from this project. for(std::vector<cmLocalGenerator*>::iterator g = generators.begin(); g != generators.end(); ++g) { @@ -2523,54 +2521,8 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root, { continue; } - cmMakefile* mf = (*g)->GetMakefile(); - std::vector<cmSourceGroup> sourceGroups = mf->GetSourceGroups(); - cmTargets &tgts = mf->GetTargets(); - // now for all custom commands that are not used directly in a - // target, add them to all targets in the current directory or - // makefile - std::set<cmStdString> banned; - banned.insert("ALL_BUILD"); - banned.insert("XCODE_DEPEND_HELPER"); - banned.insert("install"); - std::vector<cmSourceFile*> & classesmf = mf->GetSourceFiles(); - for(std::vector<cmSourceFile*>::const_iterator i = classesmf.begin(); - i != classesmf.end(); i++) - { - if(cmCustomCommand* cc = (*i)->GetCustomCommand()) - { - if(!cc->IsUsed()) - { - for(cmTargets::iterator l = tgts.begin(); - l != tgts.end(); l++) - { - if ((strncmp(l->first.c_str(), - "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) - && banned.find(l->second.GetName()) == banned.end()) - { - cmTarget& target = l->second; - bool sameAsTarget = false; - // make sure we don't add a custom command that depends on - // this target - for(unsigned int k =0; k < cc->GetDepends().size(); k++) - { - if(cmSystemTools::GetFilenameName - (cc->GetDepends()[k]) == target.GetFullName()) - { - sameAsTarget = true; - } - } - if(!sameAsTarget) - { - target.AddSourceFile(*i); - } - } - } - } - } - } } -#endif + this->CreateXCodeObjects(root, generators); std::string xcodeDir = root->GetMakefile()->GetStartOutputDirectory(); |