diff options
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 12 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.h | 9 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 39 |
4 files changed, 59 insertions, 7 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 25ba47d..c8f07ea 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -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(); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 12a0163..df7b6ab 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -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; diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index d2e9d0f..e9e579b 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -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 diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 93ac900..9fcedac 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -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"); } //---------------------------------------------------------------------------- |