COMP: Fixes for visual studio
This commit is contained in:
parent
3d617b48aa
commit
549b77034e
|
@ -692,7 +692,11 @@ void cmGlobalGenerator::Generate()
|
|||
for (i = 0; i < m_LocalGenerators.size(); ++i)
|
||||
{
|
||||
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]->GenerateInstallRules();
|
||||
m_LocalGenerators[i]->GenerateTestFiles();
|
||||
|
|
|
@ -168,12 +168,12 @@ protected:
|
|||
const cmCustomCommandLines* commandLines,
|
||||
std::vector<std::string> depends, bool depends_on_all = false);
|
||||
|
||||
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"; }
|
||||
virtual const char* GetInstallTargetName() { return "INSTALL"; }
|
||||
virtual const char* GetPreinstallTargetName() { return "PREINSTALL"; }
|
||||
virtual const char* GetTestTargetName() { return "RUN_TESTS"; }
|
||||
virtual const char* GetPackageTargetName() { return "PACKAGE"; }
|
||||
virtual const char* GetEditCacheTargetName() { return "EDIT_CACHE"; }
|
||||
virtual const char* GetRebuildCacheTargetName() { return "REBUILD_CACHE"; }
|
||||
|
||||
bool m_ForceUnixPaths;
|
||||
cmStdString m_FindMakeProgramFile;
|
||||
|
|
|
@ -119,6 +119,15 @@ protected:
|
|||
// does this generator need a requires step for any of its targets
|
||||
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
|
||||
// dependencies or commands. This is a problem for creating rules
|
||||
// that might not do anything but might have other dependencies
|
||||
|
|
|
@ -280,6 +280,9 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
|
|||
bool doneAllBuild = false;
|
||||
bool doneRunTests = false;
|
||||
bool doneInstall = false;
|
||||
bool doneEditCache = false;
|
||||
bool doneRebuildCache = false;
|
||||
bool donePackage = false;
|
||||
|
||||
// For each cmMakefile, create a VCProj for it, and
|
||||
// add it to this SLN file
|
||||
|
@ -389,6 +392,39 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
|
|||
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)
|
||||
{
|
||||
this->WriteProject(fout, si->c_str(), dir.c_str(),l->second);
|
||||
|
@ -708,6 +744,9 @@ void cmGlobalVisualStudio7Generator::Configure()
|
|||
this->CreateGUID("ALL_BUILD");
|
||||
this->CreateGUID("INSTALL");
|
||||
this->CreateGUID("RUN_TESTS");
|
||||
this->CreateGUID("EDIT_CACHE");
|
||||
this->CreateGUID("REBUILD_CACHE");
|
||||
this->CreateGUID("PACKAGE");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue