diff options
25 files changed, 86 insertions, 122 deletions
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index cdca792..988e9a7 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -105,9 +105,8 @@ bool cmBuildCommand "Ignoring PROJECT_NAME option because it has no effect."); } - std::string makecommand = this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->GenerateCMakeBuildCommand(target, configuration, - "", true); + std::string makecommand = this->Makefile->GetGlobalGenerator() + ->GenerateCMakeBuildCommand(target, configuration, "", true); this->Makefile->AddDefinition(variable, makecommand.c_str()); @@ -135,9 +134,8 @@ bool cmBuildCommand configType = cfg; } - std::string makecommand = this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->GenerateCMakeBuildCommand("", configType, - "", true); + std::string makecommand = this->Makefile->GetGlobalGenerator() + ->GenerateCMakeBuildCommand("", configType, "", true); if(cacheValue) { diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 6ecf0dc..1d88480 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -247,7 +247,7 @@ cmComputeLinkInformation this->Target = target; this->Makefile = this->Target->GetMakefile(); this->LocalGenerator = this->Makefile->GetLocalGenerator(); - this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator(); + this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance(); // Check whether to recognize OpenBSD-style library versioned names. diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index b1203dd..bf18deb 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -274,7 +274,7 @@ cmExportBuildFileGenerator ::FindNamespaces(cmMakefile* mf, const std::string& name) { std::vector<std::string> namespaces; - cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator(); + cmGlobalGenerator* gg = mf->GetGlobalGenerator(); std::map<std::string, cmExportBuildFileGenerator*>& exportSets = gg->GetBuildExportSets(); diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 06541c0..43d26f9 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -119,8 +119,7 @@ bool cmExportCommand std::vector<std::string> targets; - cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator(); + cmGlobalGenerator *gg = this->Makefile->GetGlobalGenerator(); if(args[0] == "EXPORT") { diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 6d639c9..89c6ca2 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -479,7 +479,7 @@ cmExportInstallFileGenerator ::FindNamespaces(cmMakefile* mf, const std::string& name) { std::vector<std::string> namespaces; - cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator(); + cmGlobalGenerator* gg = mf->GetGlobalGenerator(); const cmExportSetMap& exportSets = gg->GetExportSets(); for(cmExportSetMap::const_iterator expIt = exportSets.begin(); diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 14f397c..12da1fb 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -3568,8 +3568,7 @@ void cmFileCommand::AddEvaluationFile(const std::string &inputName, cmsys::auto_ptr<cmCompiledGeneratorExpression> conditionCge = conditionGe.Parse(condition); - this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->AddEvaluationFile(inputName, + this->Makefile->GetGlobalGenerator()->AddEvaluationFile(inputName, outputCge, this->Makefile, conditionCge, @@ -3772,8 +3771,8 @@ bool cmFileCommand::HandleLockCommand( fclose(file); // Actual lock/unlock - cmFileLockPool& lockPool = this->Makefile->GetLocalGenerator()-> - GetGlobalGenerator()->GetFileLockPool(); + cmFileLockPool& lockPool = this->Makefile->GetGlobalGenerator() + ->GetFileLockPool(); cmFileLockResult fileLockResult(cmFileLockResult::MakeOk()); if (release) diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 507d011..0a66732 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -212,7 +212,7 @@ struct cmFindLibraryHelper cmFindLibraryHelper::cmFindLibraryHelper(cmMakefile* mf): Makefile(mf) { - this->GG = this->Makefile->GetLocalGenerator()->GetGlobalGenerator(); + this->GG = this->Makefile->GetGlobalGenerator(); // Collect the list of library name prefixes/suffixes to try. const char* prefixes_list = diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index fa00283..c726995 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -103,8 +103,7 @@ void cmGeneratorExpressionEvaluationFile::CreateOutputFile( std::string const& config) { std::vector<std::string> enabledLanguages; - cmGlobalGenerator *gg - = this->Makefile->GetLocalGenerator()->GetGlobalGenerator(); + cmGlobalGenerator *gg = this->Makefile->GetGlobalGenerator(); gg->GetEnabledLanguages(enabledLanguages); for(std::vector<std::string>::const_iterator le = enabledLanguages.begin(); @@ -168,8 +167,7 @@ void cmGeneratorExpressionEvaluationFile::Generate() } std::vector<std::string> enabledLanguages; - cmGlobalGenerator *gg - = this->Makefile->GetLocalGenerator()->GetGlobalGenerator(); + cmGlobalGenerator *gg = this->Makefile->GetGlobalGenerator(); gg->GetEnabledLanguages(enabledLanguages); for(std::vector<std::string>::const_iterator le = enabledLanguages.begin(); diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 2654851..6c41c3b 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -768,8 +768,7 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode } std::vector<std::string> enabledLanguages; - cmGlobalGenerator* gg - = context->Makefile->GetLocalGenerator()->GetGlobalGenerator(); + cmGlobalGenerator* gg = context->Makefile->GetGlobalGenerator(); gg->GetEnabledLanguages(enabledLanguages); if (!parameters.empty() && std::find(enabledLanguages.begin(), enabledLanguages.end(), diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 1a4f9c4..e2b8c45 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -132,8 +132,7 @@ struct TagVisitor TagVisitor(cmTarget *target, DataType& data) : Data(data), Target(target), - GlobalGenerator(target->GetMakefile() - ->GetLocalGenerator()->GetGlobalGenerator()), + GlobalGenerator(target->GetMakefile()->GetGlobalGenerator()), Header(CM_HEADER_REGEX), IsObjLib(target->GetType() == cmTarget::OBJECT_LIBRARY) { @@ -226,7 +225,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t), { this->Makefile = this->Target->GetMakefile(); this->LocalGenerator = this->Makefile->GetLocalGenerator(); - this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator(); + this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); } //---------------------------------------------------------------------------- @@ -648,8 +647,7 @@ cmTargetTraceDependencies { // Convenience. this->Makefile = this->Target->GetMakefile(); - this->GlobalGenerator = - this->Makefile->GetLocalGenerator()->GetGlobalGenerator(); + this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); this->CurrentEntry = 0; // Queue all the source files already specified for the target. @@ -1025,8 +1023,7 @@ void cmGeneratorTarget::GenerateTargetManifest( return; } cmMakefile* mf = this->Target->GetMakefile(); - cmLocalGenerator* lg = mf->GetLocalGenerator(); - cmGlobalGenerator* gg = lg->GetGlobalGenerator(); + cmGlobalGenerator* gg = mf->GetGlobalGenerator(); // Get the names. std::string name; diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index b035750..76803c1 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -47,8 +47,7 @@ bool cmGetCMakePropertyCommand else if ( args[1] == "COMPONENTS" ) { const std::set<std::string>* components - = this->Makefile->GetLocalGenerator()->GetGlobalGenerator() - ->GetInstallComponents(); + = this->Makefile->GetGlobalGenerator()->GetInstallComponents(); output = cmJoin(*components, ";"); } else diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 881b2ae..4fe3318 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -53,7 +53,7 @@ bool cmGetDirectoryPropertyCommand // lookup the makefile from the directory name cmLocalGenerator *lg = - this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> + this->Makefile->GetGlobalGenerator()-> FindLocalGenerator(sd); if (!lg) { diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 00dbdd3..250bd35 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -265,8 +265,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode() // Lookup the generator. if(cmLocalGenerator* lg = - (this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->FindLocalGenerator(dir))) + (this->Makefile->GetGlobalGenerator()->FindLocalGenerator(dir))) { // Use the makefile for the directory found. mf = lg->GetMakefile(); diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index 71dabaf..372af63 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -93,8 +93,7 @@ bool cmIncludeCommand cmSystemTools::CollapseFullPath(fname, this->Makefile->GetCurrentSourceDirectory()); - cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator(); + cmGlobalGenerator *gg = this->Makefile->GetGlobalGenerator(); if (gg->IsExportedTargetsFile(fname_abs)) { const char *modal = 0; diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index fac9641..aba00bd 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -62,8 +62,7 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args, } // Enable the install target. - this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->EnableInstallTarget(); + this->Makefile->GetGlobalGenerator()->EnableInstallTarget(); this->DefaultComponentName = this->Makefile->GetSafeDefinition( "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"); @@ -198,7 +197,7 @@ bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args) } //Tell the global generator about any installation component names specified. - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(component.c_str()); return true; @@ -774,7 +773,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) te->HeaderGenerator = publicHeaderGenerator; te->LibraryGenerator = libraryGenerator; te->RuntimeGenerator = runtimeGenerator; - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->GetExportSets()[exports.GetString()]->AddTargetExport(te); te->InterfaceIncludeDirectories = @@ -786,43 +785,42 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) // specified if (installsArchive) { - this->Makefile->GetLocalGenerator()-> - GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(archiveArgs.GetComponent().c_str()); } if (installsLibrary) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(libraryArgs.GetComponent().c_str()); } if (installsRuntime) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(runtimeArgs.GetComponent().c_str()); } if (installsFramework) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(frameworkArgs.GetComponent().c_str()); } if (installsBundle) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(bundleArgs.GetComponent().c_str()); } if (installsPrivateHeader) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(privateHeaderArgs.GetComponent().c_str()); } if (installsPublicHeader) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(publicHeaderArgs.GetComponent().c_str()); } if (installsResource) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(resourceArgs.GetComponent().c_str()); } @@ -890,7 +888,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args) CreateInstallFilesGenerator(this->Makefile, absFiles, ica, programs)); //Tell the global generator about any installation component names specified. - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(ica.GetComponent().c_str()); return true; @@ -1235,7 +1233,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args) // Tell the global generator about any installation component names // specified. - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(component.c_str()); return true; @@ -1322,8 +1320,8 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args) } } - cmExportSet *exportSet = this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->GetExportSets()[exp.GetString()]; + cmExportSet *exportSet = this->Makefile->GetGlobalGenerator() + ->GetExportSets()[exp.GetString()]; if (exportOld.IsEnabled()) { for(std::vector<cmTargetExport*>::const_iterator diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index 1fe435c..508c373 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -24,8 +24,7 @@ bool cmInstallFilesCommand } // Enable the install target. - this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->EnableInstallTarget(); + this->Makefile->GetGlobalGenerator()->EnableInstallTarget(); this->Destination = args[0]; @@ -48,7 +47,7 @@ bool cmInstallFilesCommand args.begin() + 1, args.end()); } - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(this->Makefile->GetSafeDefinition( "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME")); diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index 4899b95..be8096c 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -22,14 +22,13 @@ bool cmInstallProgramsCommand } // Enable the install target. - this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->EnableInstallTarget(); + this->Makefile->GetGlobalGenerator()->EnableInstallTarget(); this->Destination = args[0]; this->FinalArgs.insert(this->FinalArgs.end(), args.begin() + 1, args.end()); - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(this->Makefile->GetSafeDefinition( "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME")); diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 11125d3..082a78c 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -728,8 +728,7 @@ cmInstallTargetGenerator i != oldRuntimeDirs.end(); ++i) { std::string runpath = - mf->GetLocalGenerator()-> - GetGlobalGenerator()->ExpandCFGIntDir(*i, config); + mf->GetGlobalGenerator()->ExpandCFGIntDir(*i, config); if(runpaths.find(runpath) == runpaths.end()) { @@ -745,8 +744,7 @@ cmInstallTargetGenerator i != newRuntimeDirs.end(); ++i) { std::string runpath = - mf->GetLocalGenerator()-> - GetGlobalGenerator()->ExpandCFGIntDir(*i, config); + mf->GetGlobalGenerator()->ExpandCFGIntDir(*i, config); if(runpaths.find(runpath) == runpaths.end()) { diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index b738844..7e7b848 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -22,8 +22,7 @@ bool cmInstallTargetsCommand } // Enable the install target. - this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->EnableInstallTarget(); + this->Makefile->GetGlobalGenerator()->EnableInstallTarget(); cmTargets &tgts = this->Makefile->GetTargets(); std::vector<std::string>::const_iterator s = args.begin(); @@ -57,7 +56,7 @@ bool cmInstallTargetsCommand } } - this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + this->Makefile->GetGlobalGenerator() ->AddInstallComponent(this->Makefile->GetSafeDefinition( "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME")); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 699c0ef..b7b4f79 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1014,7 +1014,7 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs, // Generate a rule file if the main dependency is not available. if(!file) { - cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator(); + cmGlobalGenerator* gg = this->GetGlobalGenerator(); // Construct a rule file associated with the first output produced. std::string outName = gg->GenerateRuleFile(outputs[0]); @@ -1420,8 +1420,7 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove) // VS6 IDE does not support definition values with spaces in // combination with '"', '$', or ';'. - if((this->LocalGenerator->GetGlobalGenerator()->GetName() == - "Visual Studio 6") && + if((this->GetGlobalGenerator()->GetName() == "Visual Studio 6") && (def.find(" ") != def.npos && def.find_first_of("\"$;") != def.npos)) { return false; @@ -1505,8 +1504,7 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, cmTargets::iterator i = this->Targets.find(target); if ( i != this->Targets.end()) { - cmTarget* tgt = - this->GetCMakeInstance()->GetGlobalGenerator()->FindTarget(lib); + cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib); if(tgt) { // if it is not a static or shared library then you can not link to it @@ -1698,10 +1696,9 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, } // create a new local generator and set its parent - cmLocalGenerator *lg2 = - this->LocalGenerator->GetGlobalGenerator() + cmLocalGenerator *lg2 = this->GetGlobalGenerator() ->CreateLocalGenerator(this->LocalGenerator); - this->LocalGenerator->GetGlobalGenerator()->AddLocalGenerator(lg2); + this->GetGlobalGenerator()->AddLocalGenerator(lg2); // set the subdirs start dirs lg2->GetMakefile()->SetCurrentSourceDirectory(srcPath); @@ -2017,7 +2014,7 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name, void cmMakefile::AddAlias(const std::string& lname, cmTarget *tgt) { this->AliasTargets[lname] = tgt; - this->LocalGenerator->GetGlobalGenerator()->AddAlias(lname, tgt); + this->GetGlobalGenerator()->AddAlias(lname, tgt); } cmTarget* cmMakefile::AddLibrary(const std::string& lname, @@ -2074,7 +2071,7 @@ cmMakefile::AddNewTarget(cmTarget::TargetType type, const std::string& name) cmTarget& target = it->second; target.SetType(type, name); target.SetMakefile(this); - this->LocalGenerator->GetGlobalGenerator()->AddTarget(&it->second); + this->GetGlobalGenerator()->AddTarget(&it->second); return &it->second; } @@ -2218,7 +2215,7 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name, } // build the whole source group path const char* fullname = sg->GetFullName(); - cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator(); + cmGlobalGenerator* gg = this->GetGlobalGenerator(); if(strlen(fullname)) { std::string guidName = "SG_Filter_"; @@ -3175,7 +3172,7 @@ std::string cmMakefile::GetConfigurations(std::vector<std::string>& configs, bool single) const { - if(this->LocalGenerator->GetGlobalGenerator()->IsMultiConfig()) + if(this->GetGlobalGenerator()->IsMultiConfig()) { if(const char* configTypes = this->GetDefinition("CMAKE_CONFIGURATION_TYPES")) @@ -3546,10 +3543,8 @@ void cmMakefile::EnableLanguage(std::vector<std::string> const & lang, bool optional) { this->AddDefinition("CMAKE_CFG_INTDIR", - this->LocalGenerator->GetGlobalGenerator() - ->GetCMakeCFGIntDir()); - this->LocalGenerator->GetGlobalGenerator()->EnableLanguage(lang, this, - optional); + this->GetGlobalGenerator()->GetCMakeCFGIntDir()); + this->GetGlobalGenerator()->EnableLanguage(lang, this, optional); } int cmMakefile::TryCompile(const std::string& srcdir, @@ -3579,7 +3574,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, cmake cm; cm.SetIsInTryCompile(true); cmGlobalGenerator *gg = cm.CreateGlobalGenerator - (this->LocalGenerator->GetGlobalGenerator()->GetName()); + (this->GetGlobalGenerator()->GetName()); if (!gg) { cmSystemTools::Error( @@ -3640,8 +3635,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, cm.SetCacheArgs(*cmakeArgs); } // to save time we pass the EnableLanguage info directly - gg->EnableLanguagesFromGenerator - (this->LocalGenerator->GetGlobalGenerator(), this); + gg->EnableLanguagesFromGenerator(this->GetGlobalGenerator(), this); if(this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) { cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", @@ -3673,13 +3667,12 @@ int cmMakefile::TryCompile(const std::string& srcdir, } // finally call the generator to actually build the resulting project - int ret = - this->LocalGenerator->GetGlobalGenerator()->TryCompile(srcdir,bindir, - projectName, - targetName, - fast, - output, - this); + int ret = this->GetGlobalGenerator()->TryCompile(srcdir,bindir, + projectName, + targetName, + fast, + output, + this); cmSystemTools::ChangeDirectory(cwd); this->Internal->IsSourceFileTryCompile = false; @@ -4402,16 +4395,14 @@ void cmMakefile::PushScope() this->PushLoopBlockBarrier(); #if defined(CMAKE_BUILD_WITH_CMAKE) - this->GetLocalGenerator()->GetGlobalGenerator()-> - GetFileLockPool().PushFunctionScope(); + this->GetGlobalGenerator()->GetFileLockPool().PushFunctionScope(); #endif } void cmMakefile::PopScope() { #if defined(CMAKE_BUILD_WITH_CMAKE) - this->GetLocalGenerator()->GetGlobalGenerator()-> - GetFileLockPool().PopFunctionScope(); + this->GetGlobalGenerator()->GetFileLockPool().PopFunctionScope(); #endif this->PopLoopBlockBarrier(); @@ -4474,7 +4465,7 @@ cmMakefile::AddImportedTarget(const std::string& name, this->ImportedTargets[name] = target.get(); if(global) { - this->LocalGenerator->GetGlobalGenerator()->AddTarget(target.get()); + this->GetGlobalGenerator()->AddTarget(target.get()); } // Transfer ownership to this cmMakefile object. @@ -4502,8 +4493,7 @@ cmTarget* cmMakefile::FindTargetToUse(const std::string& name, } // Look for a target built in this project. - return this->LocalGenerator->GetGlobalGenerator()->FindTarget(name, - excludeAliases); + return this->GetGlobalGenerator()->FindTarget(name, excludeAliases); } //---------------------------------------------------------------------------- @@ -4511,8 +4501,7 @@ bool cmMakefile::IsAlias(const std::string& name) const { if (this->AliasTargets.find(name) != this->AliasTargets.end()) return true; - return this->GetLocalGenerator()->GetGlobalGenerator()->IsAlias( - name); + return this->GetGlobalGenerator()->IsAlias(name); } //---------------------------------------------------------------------------- @@ -4521,7 +4510,7 @@ cmMakefile::FindGeneratorTargetToUse(const std::string& name) const { if (cmTarget *t = this->FindTargetToUse(name)) { - return this->LocalGenerator->GetGlobalGenerator()->GetGeneratorTarget(t); + return this->GetGlobalGenerator()->GetGeneratorTarget(t); } return 0; } @@ -4626,7 +4615,7 @@ bool cmMakefile::EnforceUniqueDir(const std::string& srcPath, const std::string& binPath) const { // Make sure the binary directory is unique. - cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator(); + cmGlobalGenerator* gg = this->GetGlobalGenerator(); if(gg->BinaryDirectoryIsNew(binPath)) { return true; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 91b2b27..457de11 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -396,7 +396,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target) std::vector<std::string> rcc_output; bool const isNinja = - makefile->GetLocalGenerator()->GetGlobalGenerator()->GetName() == "Ninja"; + makefile->GetGlobalGenerator()->GetName() == "Ninja"; if(isNinja #if defined(_WIN32) && !defined(__CYGWIN__) || usePRE_BUILD @@ -524,9 +524,8 @@ static void GetCompileDefinitionsAndDirectories(cmTarget const* target, cmMakefile* makefile = target->GetMakefile(); cmLocalGenerator* localGen = makefile->GetLocalGenerator(); std::vector<std::string> includeDirs; - cmGeneratorTarget *gtgt = target->GetMakefile()->GetLocalGenerator() - ->GetGlobalGenerator() - ->GetGeneratorTarget(target); + cmGeneratorTarget *gtgt = localGen->GetGlobalGenerator() + ->GetGeneratorTarget(target); // Get the include dirs for this target, without stripping the implicit // include dirs off, see http://public.kitware.com/Bug/view.php?id=13667 localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false); diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 35262b6..31e460f 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -207,8 +207,7 @@ bool cmSetPropertyCommand::HandleDirectoryMode() // Lookup the generator. if(cmLocalGenerator* lg = - (this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->FindLocalGenerator(dir))) + this->Makefile->GetGlobalGenerator()->FindLocalGenerator(dir)) { // Use the makefile for the directory found. mf = lg->GetMakefile(); diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index cdd04ed..724ab39 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -282,7 +282,7 @@ void cmSourceFile::CheckLanguage(std::string const& ext) { // Try to identify the source file language from the extension. cmMakefile const* mf = this->Location.GetMakefile(); - cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator(); + cmGlobalGenerator* gg = mf->GetGlobalGenerator(); std::string l = gg->GetLanguageFromExtension(ext.c_str()); if(!l.empty()) { diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index a0eba5e..4a87cc2 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -120,8 +120,7 @@ void cmSourceFileLocation::UpdateExtension(const std::string& name) if(!ext.empty()) { ext = ext.substr(1); } // The global generator checks extensions of enabled languages. - cmGlobalGenerator* gg = - this->Makefile->GetLocalGenerator()->GetGlobalGenerator(); + cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); cmMakefile const* mf = this->Makefile; const std::vector<std::string>& srcExts = mf->GetSourceExtensions(); const std::vector<std::string>& hdrExts = mf->GetHeaderExtensions(); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f69e9ae..ff1fa8a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -511,7 +511,7 @@ void cmTarget::FinishConfigure() #if defined(_WIN32) && !defined(__CYGWIN__) // Do old-style link dependency analysis only for CM_USE_OLD_VS6. - if(this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->IsForVS6()) + if(this->Makefile->GetGlobalGenerator()->IsForVS6()) { this->AnalyzeLibDependenciesForVS6(*this->Makefile); } @@ -847,8 +847,7 @@ cmTarget::GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const std::ostringstream e; e << "Target \"" << this->Name << "\" has source files which vary by " "configuration. This is not supported by the \"" - << this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator()->GetName() + << this->Makefile->GetGlobalGenerator()->GetName() << "\" generator.\n" "Config \"" << firstConfig << "\":\n" " " << firstConfigFiles << "\n" @@ -1188,7 +1187,7 @@ void cmTarget::ClearDependencyInformation( cmMakefile& mf, //---------------------------------------------------------------------------- bool cmTarget::NameResolvesToFramework(const std::string& libname) const { - return this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> + return this->Makefile->GetGlobalGenerator()-> NameResolvesToFramework(libname); } @@ -3329,7 +3328,7 @@ public: cmTargetSelectLinker(cmTarget const* target): Preference(0), Target(target) { this->Makefile = this->Target->GetMakefile(); - this->GG = this->Makefile->GetLocalGenerator()->GetGlobalGenerator(); + this->GG = this->Makefile->GetGlobalGenerator(); } void Consider(const std::string& lang) { @@ -3764,7 +3763,7 @@ bool cmTarget::MacOSXRpathInstallNameDirDefault() const if(cmp0042 == cmPolicies::WARN) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> + this->Makefile->GetGlobalGenerator()-> AddCMP0042WarnTarget(this->GetName()); } @@ -4551,7 +4550,7 @@ bool cmTarget::ComputeOutputDir(const std::string& config, "CMAKE_XCODE_EFFECTIVE_PLATFORMS"); std::string suffix = usesDefaultOutputDir && platforms ? "$(EFFECTIVE_PLATFORM_NAME)" : ""; - this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> + this->Makefile->GetGlobalGenerator()-> AppendDirectoryForConfig("/", conf, suffix, out); } @@ -4613,7 +4612,7 @@ bool cmTarget::ComputePDBOutputDir(const std::string& kind, // The generator may add the configuration's subdirectory. if(!conf.empty()) { - this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> + this->Makefile->GetGlobalGenerator()-> AppendDirectoryForConfig("/", conf, "", out); } return true; @@ -5276,8 +5275,7 @@ void cmTarget::GetLanguages(std::set<std::string>& languages, } else { - cmGeneratorTarget* gt = this->Makefile->GetLocalGenerator() - ->GetGlobalGenerator() + cmGeneratorTarget* gt = this->Makefile->GetGlobalGenerator() ->GetGeneratorTarget(this); gt->GetExternalObjects(externalObjects, config); for(std::vector<cmSourceFile const*>::const_iterator |