mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 12:09:48 +00:00
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.
This commit is contained in:
parent
0fa1bd2f71
commit
60f02a27db
@ -772,7 +772,7 @@ void cmGlobalXCodeGenerator::AddFrameworkPhases(cmTarget* target,
|
|||||||
cmXCodeObject* xsf =
|
cmXCodeObject* xsf =
|
||||||
this->CreateXCodeSourceFile(this->CurrentLocalGenerator,
|
this->CreateXCodeSourceFile(this->CurrentLocalGenerator,
|
||||||
sf, *target);
|
sf, *target);
|
||||||
std::cerr << "copy header " << sf->GetFullPath() << "\n";
|
//std::cerr << "copy header " << sf->GetFullPath() << "\n";
|
||||||
headersToCopy->AddObject(xsf);
|
headersToCopy->AddObject(xsf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1515,7 +1515,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
|||||||
install_name_dir = install_name_dir + "/..";
|
install_name_dir = install_name_dir + "/..";
|
||||||
install_name_dir =
|
install_name_dir =
|
||||||
cmSystemTools::CollapseFullPath(install_name_dir.c_str());
|
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;
|
return;
|
||||||
}
|
}
|
||||||
#if 1
|
// Skip local generators that are excluded from this project.
|
||||||
// TODO: This block should be moved to a central location for all
|
|
||||||
// generators. It is duplicated in every generator.
|
|
||||||
for(std::vector<cmLocalGenerator*>::iterator g = generators.begin();
|
for(std::vector<cmLocalGenerator*>::iterator g = generators.begin();
|
||||||
g != generators.end(); ++g)
|
g != generators.end(); ++g)
|
||||||
{
|
{
|
||||||
@ -2523,54 +2521,8 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
|
|||||||
{
|
{
|
||||||
continue;
|
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,
|
this->CreateXCodeObjects(root,
|
||||||
generators);
|
generators);
|
||||||
std::string xcodeDir = root->GetMakefile()->GetStartOutputDirectory();
|
std::string xcodeDir = root->GetMakefile()->GetStartOutputDirectory();
|
||||||
|
Loading…
Reference in New Issue
Block a user