COMP: Fixes for visual studio

This commit is contained in:
Andy Cedilnik 2006-02-23 13:37:35 -05:00
parent 3d617b48aa
commit 549b77034e
4 changed files with 59 additions and 7 deletions

View File

@ -692,7 +692,11 @@ void cmGlobalGenerator::Generate()
for (i = 0; i < m_LocalGenerators.size(); ++i) for (i = 0; i < m_LocalGenerators.size(); ++i)
{ {
cmTargets* targets = &(m_LocalGenerators[i]->GetMakefile()->GetTargets()); cmTargets* targets = &(m_LocalGenerators[i]->GetMakefile()->GetTargets());
targets->insert(globalTargets.begin(), globalTargets.end()); cmTargets::iterator tit;
for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
{
targets[tit->first] = tit->second;
}
m_LocalGenerators[i]->Generate(); m_LocalGenerators[i]->Generate();
m_LocalGenerators[i]->GenerateInstallRules(); m_LocalGenerators[i]->GenerateInstallRules();
m_LocalGenerators[i]->GenerateTestFiles(); m_LocalGenerators[i]->GenerateTestFiles();

View File

@ -168,12 +168,12 @@ protected:
const cmCustomCommandLines* commandLines, const cmCustomCommandLines* commandLines,
std::vector<std::string> depends, bool depends_on_all = false); std::vector<std::string> depends, bool depends_on_all = false);
virtual const char* GetInstallTargetName() { return "install"; } virtual const char* GetInstallTargetName() { return "INSTALL"; }
virtual const char* GetPreinstallTargetName() { return "preinstall"; } virtual const char* GetPreinstallTargetName() { return "PREINSTALL"; }
virtual const char* GetTestTargetName() { return "test"; } virtual const char* GetTestTargetName() { return "RUN_TESTS"; }
virtual const char* GetPackageTargetName() { return "package"; } virtual const char* GetPackageTargetName() { return "PACKAGE"; }
virtual const char* GetEditCacheTargetName() { return "edit_cache"; } virtual const char* GetEditCacheTargetName() { return "EDIT_CACHE"; }
virtual const char* GetRebuildCacheTargetName() { return "rebuild_cache"; } virtual const char* GetRebuildCacheTargetName() { return "REBUILD_CACHE"; }
bool m_ForceUnixPaths; bool m_ForceUnixPaths;
cmStdString m_FindMakeProgramFile; cmStdString m_FindMakeProgramFile;

View File

@ -119,6 +119,15 @@ protected:
// does this generator need a requires step for any of its targets // does this generator need a requires step for any of its targets
bool NeedRequiresStep(cmLocalUnixMakefileGenerator3 *lg, const char *); bool NeedRequiresStep(cmLocalUnixMakefileGenerator3 *lg, const char *);
// Setup target names
virtual const char* GetInstallTargetName() { return "install"; }
virtual const char* GetPreinstallTargetName() { return "preinstall"; }
virtual const char* GetTestTargetName() { return "test"; }
virtual const char* GetPackageTargetName() { return "package"; }
virtual const char* GetEditCacheTargetName() { return "edit_cache"; }
virtual const char* GetRebuildCacheTargetName() { return "rebuild_cache"; }
// Some make programs (Borland) do not keep a rule if there are no // Some make programs (Borland) do not keep a rule if there are no
// dependencies or commands. This is a problem for creating rules // dependencies or commands. This is a problem for creating rules
// that might not do anything but might have other dependencies // that might not do anything but might have other dependencies

View File

@ -280,6 +280,9 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
bool doneAllBuild = false; bool doneAllBuild = false;
bool doneRunTests = false; bool doneRunTests = false;
bool doneInstall = false; bool doneInstall = false;
bool doneEditCache = false;
bool doneRebuildCache = false;
bool donePackage = false;
// For each cmMakefile, create a VCProj for it, and // For each cmMakefile, create a VCProj for it, and
// add it to this SLN file // add it to this SLN file
@ -389,6 +392,39 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
doneRunTests = true; doneRunTests = true;
} }
} }
if(l->first == "EDIT_CACHE")
{
if(doneEditCache)
{
skip = true;
}
else
{
doneEditCache = true;
}
}
if(l->first == "REBUILD_CACHE")
{
if(doneRebuildCache)
{
skip = true;
}
else
{
doneRebuildCache = true;
}
}
if(l->first == "PACKAGE")
{
if(donePackage)
{
skip = true;
}
else
{
donePackage = true;
}
}
if(!skip) if(!skip)
{ {
this->WriteProject(fout, si->c_str(), dir.c_str(),l->second); this->WriteProject(fout, si->c_str(), dir.c_str(),l->second);
@ -708,6 +744,9 @@ void cmGlobalVisualStudio7Generator::Configure()
this->CreateGUID("ALL_BUILD"); this->CreateGUID("ALL_BUILD");
this->CreateGUID("INSTALL"); this->CreateGUID("INSTALL");
this->CreateGUID("RUN_TESTS"); this->CreateGUID("RUN_TESTS");
this->CreateGUID("EDIT_CACHE");
this->CreateGUID("REBUILD_CACHE");
this->CreateGUID("PACKAGE");
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------