diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 118d5a312..c2e996c22 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -76,7 +76,7 @@ cmLocalGenerator::~cmLocalGenerator() bool cmLocalGenerator::IsRootMakefile() const { - return !this->GetParent(); + return !this->StateSnapshot.GetParent().IsValid(); } //---------------------------------------------------------------------------- @@ -115,8 +115,10 @@ void cmLocalGenerator::Configure() filesDir += cmake::GetCMakeFilesDirectory(); cmSystemTools::MakeDirectory(filesDir.c_str()); - // find & read the list file - this->ReadInputFile(); + std::string currentStart = this->StateSnapshot.GetCurrentSourceDirectory(); + currentStart += "/CMakeLists.txt"; + assert(cmSystemTools::FileExists(currentStart.c_str(), true)); + this->Makefile->ProcessBuildsystemFile(currentStart.c_str()); // at the end of the ReadListFile handle any old style subdirs // first get all the subdirectories @@ -183,16 +185,6 @@ void cmLocalGenerator::ComputeObjectMaxPath() this->ObjectMaxPathViolations.clear(); } -//---------------------------------------------------------------------------- -void cmLocalGenerator::ReadInputFile() -{ - // Look for the CMakeLists.txt file. - std::string currentStart = this->StateSnapshot.GetCurrentSourceDirectory(); - currentStart += "/CMakeLists.txt"; - assert(cmSystemTools::FileExists(currentStart.c_str(), true)); - this->Makefile->ProcessBuildsystemFile(currentStart.c_str()); -} - void cmLocalGenerator::ConfigureFinalPass() { this->Makefile->ConfigureFinalPass(); @@ -1003,8 +995,8 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable, { return this->Convert(cmSystemTools::GetCMakeCommand(), FULL, SHELL); } - std::vector enabledLanguages; - this->GlobalGenerator->GetEnabledLanguages(enabledLanguages); + std::vector enabledLanguages = + this->GetState()->GetEnabledLanguages(); // loop over language specific replace variables int pos = 0; while(ruleReplaceVars[pos]) @@ -1846,7 +1838,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, fdi != fwDirs.end(); ++fdi) { frameworkPath += fwSearchFlag; - frameworkPath += this->Convert(*fdi, NONE, shellFormat, false); + frameworkPath += this->Convert(*fdi, NONE, shellFormat); frameworkPath += " "; } } @@ -1900,7 +1892,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, ri != runtimeDirs.end(); ++ri) { rpath += cli.GetRuntimeFlag(); - rpath += this->Convert(*ri, NONE, shellFormat, false); + rpath += this->Convert(*ri, NONE, shellFormat); rpath += " "; } fout << rpath; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 67ac4fdd7..3fca22575 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -395,7 +395,7 @@ public: protected: ///! put all the libraries for a target on into the given stream - virtual void OutputLinkLibraries(std::string& linkLibraries, + void OutputLinkLibraries(std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget &, @@ -447,9 +447,6 @@ protected: definition. Issues a warning. */ virtual bool CheckDefinition(std::string const& define) const; - /** Read the input CMakeLists.txt file. */ - void ReadInputFile(); - cmMakefile *Makefile; cmState::Snapshot StateSnapshot; cmGlobalGenerator *GlobalGenerator; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index c001622d8..450f57351 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -626,7 +626,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules install_name_dir = this->LocalGenerator->Convert(install_name_dir, cmLocalGenerator::NONE, - cmLocalGenerator::SHELL, false); + cmLocalGenerator::SHELL); vars.TargetInstallNameDir = install_name_dir.c_str(); } } diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 940701116..bbf03ffe4 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -525,8 +525,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() { vars["INSTALLNAME_DIR"] = localGen.Convert(install_dir, cmLocalGenerator::NONE, - cmLocalGenerator::SHELL, - false); + cmLocalGenerator::SHELL); } } } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index b2c603f03..ebec9236c 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -456,8 +456,7 @@ bool cmake::FindPackage(const std::vector& args) std::vector includeDirs; cmSystemTools::ExpandListArgument(includes, includeDirs); - std::string includeFlags = lg->GetIncludeFlags(includeDirs, 0, - language, false); + std::string includeFlags = lg->GetIncludeFlags(includeDirs, 0, language); std::string definitions = mf->GetSafeDefinition("PACKAGE_DEFINITIONS"); printf("%s %s\n", includeFlags.c_str(), definitions.c_str());