From b659d161da3c488890e32fbb1acf1295186d3c4f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:18:25 +0200 Subject: cmGlobalGenerator: Add NVI wrapper to create local generator. --- Source/CPack/cmCPackGenerator.cxx | 2 +- Source/CPack/cpack.cxx | 2 +- Source/CTest/cmCTestLaunch.cxx | 2 +- Source/CTest/cmCTestScriptHandler.cxx | 2 +- Source/CTest/cmCTestTestHandler.cxx | 2 +- Source/cmCTest.cxx | 2 +- Source/cmGlobalGenerator.cxx | 8 +++++++- Source/cmGlobalGenerator.h | 6 ++++-- Source/cmGlobalUnixMakefileGenerator3.cxx | 2 +- Source/cmGraphVizWriter.cxx | 2 +- Source/cmMakefile.cxx | 2 +- Source/cmQtAutoGenerators.cxx | 2 +- Source/cmake.cxx | 8 ++++---- Source/cmcmd.cxx | 2 +- 14 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index e254e9a..6e30f8c 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -715,7 +715,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( cm.SetProgressCallback(cmCPackGeneratorProgress, this); cmGlobalGenerator gg; gg.SetCMakeInstance(&cm); - cmsys::auto_ptr lg(gg.CreateLocalGenerator()); + cmsys::auto_ptr lg(gg.MakeLocalGenerator()); cmMakefile *mf = lg->GetMakefile(); std::string realInstallDirectory = tempInstallDirectory; if ( !installSubDirectory.empty() && installSubDirectory != "/" ) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 2207873..29484cf 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -201,7 +201,7 @@ int main (int argc, char const* const* argv) cminst.GetState()->RemoveUnscriptableCommands(); cmGlobalGenerator cmgg; cmgg.SetCMakeInstance(&cminst); - cmsys::auto_ptr cmlg(cmgg.CreateLocalGenerator()); + cmsys::auto_ptr cmlg(cmgg.MakeLocalGenerator()); cmMakefile* globalMF = cmlg->GetMakefile(); #if defined(__CYGWIN__) globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0"); diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index de6ecde..d3edc80 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -752,7 +752,7 @@ void cmCTestLaunch::LoadConfig() cmake cm; cmGlobalGenerator gg; gg.SetCMakeInstance(&cm); - cmsys::auto_ptr lg(gg.CreateLocalGenerator()); + cmsys::auto_ptr lg(gg.MakeLocalGenerator()); cmMakefile* mf = lg->GetMakefile(); std::string fname = this->LogDir; fname += "CTestLaunchConfig.cmake"; diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 0a34be8..7ee9d85 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -340,7 +340,7 @@ void cmCTestScriptHandler::CreateCMake() this->GlobalGenerator = new cmGlobalGenerator; this->GlobalGenerator->SetCMakeInstance(this->CMake); - this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator(); + this->LocalGenerator = this->GlobalGenerator->MakeLocalGenerator(); this->Makefile = this->LocalGenerator->GetMakefile(); this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 95cdf3b..5d40f91 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1573,7 +1573,7 @@ void cmCTestTestHandler::GetListOfTests() cmake cm; cmGlobalGenerator gg; gg.SetCMakeInstance(&cm); - cmsys::auto_ptr lg(gg.CreateLocalGenerator()); + cmsys::auto_ptr lg(gg.MakeLocalGenerator()); cmMakefile *mf = lg->GetMakefile(); mf->AddDefinition("CTEST_CONFIGURATION_TYPE", this->CTest->GetConfigType().c_str()); diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 403a459..f3c4da5 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -512,7 +512,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command) cmake cm; cmGlobalGenerator gg; gg.SetCMakeInstance(&cm); - cmsys::auto_ptr lg(gg.CreateLocalGenerator()); + cmsys::auto_ptr lg(gg.MakeLocalGenerator()); cmMakefile *mf = lg->GetMakefile(); if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) ) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 1c9c475..cf9e6e6 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1099,7 +1099,7 @@ void cmGlobalGenerator::Configure() this->ClearGeneratorMembers(); // start with this directory - cmLocalGenerator *lg = this->CreateLocalGenerator(); + cmLocalGenerator *lg = this->MakeLocalGenerator(); this->LocalGenerators.push_back(lg); // set the Start directories @@ -1882,6 +1882,12 @@ void cmGlobalGenerator::EnableInstallTarget() } cmLocalGenerator * +cmGlobalGenerator::MakeLocalGenerator(cmLocalGenerator *parent) +{ + return this->CreateLocalGenerator(parent); +} + +cmLocalGenerator * cmGlobalGenerator::CreateLocalGenerator(cmLocalGenerator *parent) { return new cmLocalGenerator(this, parent); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 3b2a41f..9ac741d 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -52,8 +52,7 @@ public: cmGlobalGenerator(); virtual ~cmGlobalGenerator(); - ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0); + cmLocalGenerator* MakeLocalGenerator(cmLocalGenerator* parent = 0); ///! Get the name for this generator virtual std::string GetName() const { return "Generic"; } @@ -442,6 +441,9 @@ protected: virtual bool UseFolderProperty(); private: + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent); + cmMakefile* TryCompileOuterMakefile; float FirstTimeProgress; // If you add a new map here, make sure it is copied diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index a4df493..181f4c0 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -580,7 +580,7 @@ void cmGlobalUnixMakefileGenerator3 else { lg = static_cast - (this->CreateLocalGenerator()); + (this->MakeLocalGenerator()); // set the Start directories lg->GetMakefile()->SetCurrentSourceDirectory (this->CMakeInstance->GetHomeDirectory()); diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 99542a9..7cad8a1 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -67,7 +67,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, cmake cm; cmGlobalGenerator ggi; ggi.SetCMakeInstance(&cm); - cmsys::auto_ptr lg(ggi.CreateLocalGenerator()); + cmsys::auto_ptr lg(ggi.MakeLocalGenerator()); cmMakefile *mf = lg->GetMakefile(); const char* inFileName = settingsFileName; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7b8d3af..2d855ee 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1706,7 +1706,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, // create a new local generator and set its parent cmLocalGenerator *lg2 = this->GetGlobalGenerator() - ->CreateLocalGenerator(this->LocalGenerator); + ->MakeLocalGenerator(this->LocalGenerator); this->GetGlobalGenerator()->AddLocalGenerator(lg2); // set the subdirs start dirs diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 457de11..983f234 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1212,7 +1212,7 @@ static cmGlobalGenerator* CreateGlobalGenerator(cmake* cm, cm->SetHomeOutputDirectory(targetDirectory); cm->SetHomeDirectory(targetDirectory); - cmLocalGenerator* lg = gg->CreateLocalGenerator(); + cmLocalGenerator* lg = gg->MakeLocalGenerator(); lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory); lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory); gg->SetCurrentLocalGenerator(lg); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 5c5c428..c5a98d5 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -376,7 +376,7 @@ void cmake::ReadListFile(const std::vector& args, std::string homeOutputDir = this->GetHomeOutputDirectory(); this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); - cmsys::auto_ptr lg(gg->CreateLocalGenerator()); + cmsys::auto_ptr lg(gg->MakeLocalGenerator()); lg->GetMakefile()->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); lg->GetMakefile()->SetCurrentSourceDirectory @@ -418,7 +418,7 @@ bool cmake::FindPackage(const std::vector& args) this->SetGlobalGenerator(gg); // read in the list file to fill the cache - cmsys::auto_ptr lg(gg->CreateLocalGenerator()); + cmsys::auto_ptr lg(gg->MakeLocalGenerator()); cmMakefile* mf = lg->GetMakefile(); mf->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); @@ -1927,7 +1927,7 @@ int cmake::CheckBuildSystem() cmake cm; cmGlobalGenerator gg; gg.SetCMakeInstance(&cm); - cmsys::auto_ptr lg(gg.CreateLocalGenerator()); + cmsys::auto_ptr lg(gg.MakeLocalGenerator()); cmMakefile* mf = lg->GetMakefile(); if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) || cmSystemTools::GetErrorOccuredFlag()) @@ -1957,7 +1957,7 @@ int cmake::CheckBuildSystem() ggd(this->CreateGlobalGenerator(genName)); if(ggd.get()) { - cmsys::auto_ptr lgd(ggd->CreateLocalGenerator()); + cmsys::auto_ptr lgd(ggd->MakeLocalGenerator()); lgd->ClearDependencies(mf, verbose); } } diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 12bb8ee..3400625 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -646,7 +646,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen)) { cm.SetGlobalGenerator(ggd); - cmsys::auto_ptr lgd(ggd->CreateLocalGenerator()); + cmsys::auto_ptr lgd(ggd->MakeLocalGenerator()); lgd->GetMakefile()->SetCurrentSourceDirectory(startDir); lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir); -- cgit v0.12 From 24613d8b45b4f76e9227e9dec4dcd19ae9cfdfb5 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:18:32 +0200 Subject: cmLocalGenerator: Remove unused method. --- Source/cmLocalUnixMakefileGenerator3.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 7b436a5..4836867 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -99,7 +99,6 @@ public: */ void SetIncludeDirective(const std::string& s) { this->IncludeDirective = s; } - const std::string& GetIncludeDirective() { return this->IncludeDirective; } /** * Set max makefile variable size, default is 0 which means unlimited. -- cgit v0.12 From e9b134b95ddc832979b2cf78aff68643139e5006 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:18:39 +0200 Subject: cmGlobalUnixMakefileGenerator3: Host the include directive. There is no sense in copying this to each cmLocalGenerator. --- Source/cmGlobalBorlandMakefileGenerator.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 2 ++ Source/cmGlobalUnixMakefileGenerator3.h | 2 ++ Source/cmGlobalWatcomWMakeGenerator.cxx | 2 +- Source/cmLocalUnixMakefileGenerator3.cxx | 1 - Source/cmLocalUnixMakefileGenerator3.h | 8 -------- Source/cmMakefileTargetGenerator.cxx | 6 +++--- Source/cmMakefileUtilityTargetGenerator.cxx | 2 +- 8 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index d191056..ab878fe 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -22,6 +22,7 @@ cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator() this->ToolSupportsColor = true; this->UseLinkScript = false; this->WindowsShell = true; + this->IncludeDirective = "!include"; } @@ -43,7 +44,6 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator( { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetIncludeDirective("!include"); lg->SetDefineWindowsNULL(true); lg->SetMakefileVariableSize(32); lg->SetPassMakeflags(true); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 181f4c0..32523de 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -33,6 +33,8 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3() this->UseLinkScript = true; #endif this->CommandDatabase = NULL; + + this->IncludeDirective = "include"; } void cmGlobalUnixMakefileGenerator3 diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 165a3c8..950a446 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -132,6 +132,8 @@ public: virtual bool AllowDeleteOnError() const { return true; } virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; + + std::string IncludeDirective; protected: void WriteMainMakefile2(); void WriteMainCMakefile(); diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 181178f..fcc754a 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -26,6 +26,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator() this->WindowsShell = true; #endif this->WatcomWMake = true; + this->IncludeDirective = "!include"; } void cmGlobalWatcomWMakeGenerator @@ -55,7 +56,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent) lg->SetIgnoreLibPrefix(true); lg->SetPassMakeflags(false); lg->SetUnixCD(false); - lg->SetIncludeDirective("!include"); return lg; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index f11c79e..3db0433 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -83,7 +83,6 @@ cmLocalUnixMakefileGenerator3:: cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent) : cmLocalGenerator(gg, parent) { - this->IncludeDirective = "include"; this->MakefileVariableSize = 0; this->IgnoreLibPrefix = false; this->PassMakeflags = false; diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 4836867..492f5d3 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -94,13 +94,6 @@ public: void SetUnixCD(bool v) {this->UnixCD = v;} /** - * Set the string used to include one makefile into another default - * is include. - */ - void SetIncludeDirective(const std::string& s) - { this->IncludeDirective = s; } - - /** * Set max makefile variable size, default is 0 which means unlimited. */ void SetMakefileVariableSize(int s) { this->MakefileVariableSize = s; } @@ -302,7 +295,6 @@ private: //========================================================================== // Configuration settings. int MakefileVariableSize; - std::string IncludeDirective; std::string MakeSilentFlag; std::string ConfigurationName; bool DefineWindowsNULL; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 2ee23d1..9afe09c 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -226,7 +226,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() dependFileNameFull += "/depend.make"; *this->BuildFileStream << "# Include any dependencies generated for this target.\n" - << this->LocalGenerator->IncludeDirective << " " << root + << this->GlobalGenerator->IncludeDirective << " " << root << this->Convert(dependFileNameFull, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE) @@ -237,7 +237,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() // Include the progress variables for the target. *this->BuildFileStream << "# Include the progress variables for this target.\n" - << this->LocalGenerator->IncludeDirective << " " << root + << this->GlobalGenerator->IncludeDirective << " " << root << this->Convert(this->ProgressFileNameFull, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE) @@ -270,7 +270,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() // Include the flags for the target. *this->BuildFileStream << "# Include the compile flags for this target's objects.\n" - << this->LocalGenerator->IncludeDirective << " " << root + << this->GlobalGenerator->IncludeDirective << " " << root << this->Convert(this->FlagFileNameFull, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE) diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 617214f..25d929c 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -51,7 +51,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() // Include the progress variables for the target. *this->BuildFileStream << "# Include the progress variables for this target.\n" - << this->LocalGenerator->IncludeDirective << " " << root + << this->GlobalGenerator->IncludeDirective << " " << root << this->Convert(this->ProgressFileNameFull, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE) -- cgit v0.12 From cf7f03e5229aa011e176589fbc71cf4fb259f897 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:20:36 +0200 Subject: cmGlobalUnixMakefileGenerator3: Host the DefineWindowsNULL. --- Source/cmGlobalBorlandMakefileGenerator.cxx | 2 +- Source/cmGlobalJOMMakefileGenerator.cxx | 2 +- Source/cmGlobalNMakeMakefileGenerator.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 1 + Source/cmGlobalUnixMakefileGenerator3.h | 1 + Source/cmGlobalWatcomWMakeGenerator.cxx | 2 +- Source/cmLocalUnixMakefileGenerator3.cxx | 5 +++-- Source/cmLocalUnixMakefileGenerator3.h | 8 -------- 8 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index ab878fe..b0adb95 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -23,6 +23,7 @@ cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator() this->UseLinkScript = false; this->WindowsShell = true; this->IncludeDirective = "!include"; + this->DefineWindowsNULL = true; } @@ -44,7 +45,6 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator( { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetDefineWindowsNULL(true); lg->SetMakefileVariableSize(32); lg->SetPassMakeflags(true); lg->SetUnixCD(false); diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 25613eb..35d20ed 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -21,6 +21,7 @@ cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator() this->UseLinkScript = false; this->WindowsShell = true; this->NMake = true; + this->DefineWindowsNULL = true; } void cmGlobalJOMMakefileGenerator @@ -52,7 +53,6 @@ cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetDefineWindowsNULL(true); lg->SetMakeSilentFlag("/nologo"); lg->SetIgnoreLibPrefix(true); lg->SetPassMakeflags(true); diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 98d7fb4..c059ba0 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -21,6 +21,7 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator() this->UseLinkScript = false; this->WindowsShell = true; this->NMake = true; + this->DefineWindowsNULL = true; } void cmGlobalNMakeMakefileGenerator @@ -52,7 +53,6 @@ cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetDefineWindowsNULL(true); lg->SetMakeSilentFlag("/nologo"); lg->SetIgnoreLibPrefix(true); lg->SetPassMakeflags(true); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 32523de..fd9b851 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -35,6 +35,7 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3() this->CommandDatabase = NULL; this->IncludeDirective = "include"; + this->DefineWindowsNULL = false; } void cmGlobalUnixMakefileGenerator3 diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 950a446..ffe65a0 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -134,6 +134,7 @@ public: virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; std::string IncludeDirective; + bool DefineWindowsNULL; protected: void WriteMainMakefile2(); void WriteMainCMakefile(); diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index fcc754a..10a8d19 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -27,6 +27,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator() #endif this->WatcomWMake = true; this->IncludeDirective = "!include"; + this->DefineWindowsNULL = true; } void cmGlobalWatcomWMakeGenerator @@ -51,7 +52,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetDefineWindowsNULL(true); lg->SetMakeSilentFlag("-h"); lg->SetIgnoreLibPrefix(true); lg->SetPassMakeflags(false); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 3db0433..39b35a4 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -86,7 +86,6 @@ cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent) this->MakefileVariableSize = 0; this->IgnoreLibPrefix = false; this->PassMakeflags = false; - this->DefineWindowsNULL = false; this->UnixCD = true; this->ColorMakefile = false; this->SkipPreprocessedSourceRules = false; @@ -719,7 +718,9 @@ cmLocalUnixMakefileGenerator3 makefileStream << "# Set environment variables for the build.\n" << "\n"; - if(this->DefineWindowsNULL) + cmGlobalUnixMakefileGenerator3* gg = + static_cast(this->GlobalGenerator); + if(gg->DefineWindowsNULL) { makefileStream << "!IF \"$(OS)\" == \"Windows_NT\"\n" diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 492f5d3..37a9265 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -81,13 +81,6 @@ public: std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; } /** - * If set to true, then NULL is set to nil for non Windows_NT. - * This uses make syntax used by nmake and borland. - * The default is false. - */ - void SetDefineWindowsNULL(bool v) {this->DefineWindowsNULL = v;} - - /** * If set to true, cd dir && command is used to * run commands in a different directory. */ @@ -297,7 +290,6 @@ private: int MakefileVariableSize; std::string MakeSilentFlag; std::string ConfigurationName; - bool DefineWindowsNULL; bool UnixCD; bool PassMakeflags; bool MakeCommandEscapeTargetTwice; -- cgit v0.12 From 14f171c3ba1f996f8c97b9373fc58cbe34e97d6f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 18 May 2015 20:01:37 +0200 Subject: Remove method calls just repeating the default. --- Source/cmGlobalMSYSMakefileGenerator.cxx | 2 -- Source/cmGlobalMinGWMakefileGenerator.cxx | 2 -- Source/cmGlobalWatcomWMakeGenerator.cxx | 1 - 3 files changed, 5 deletions(-) diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index b6adcbb..d34df8b 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -100,8 +100,6 @@ cmGlobalMSYSMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetIgnoreLibPrefix(true); - lg->SetPassMakeflags(false); - lg->SetUnixCD(true); return lg; } diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index 5b92eeb..0268624 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -65,8 +65,6 @@ cmGlobalMinGWMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetIgnoreLibPrefix(true); - lg->SetPassMakeflags(false); - lg->SetUnixCD(true); return lg; } diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 10a8d19..b97ee66 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -54,7 +54,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent) = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("-h"); lg->SetIgnoreLibPrefix(true); - lg->SetPassMakeflags(false); lg->SetUnixCD(false); return lg; } -- cgit v0.12 From a97df5e13566cc2ccbaf51a395b85b03b363a07f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:20:58 +0200 Subject: cmGlobalUnixMakefileGenerator3: Host the PassMakeflags. --- Source/cmGlobalBorlandMakefileGenerator.cxx | 2 +- Source/cmGlobalJOMMakefileGenerator.cxx | 2 +- Source/cmGlobalNMakeMakefileGenerator.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 1 + Source/cmGlobalUnixMakefileGenerator3.h | 1 + Source/cmLocalUnixMakefileGenerator3.cxx | 5 +++-- Source/cmLocalUnixMakefileGenerator3.h | 9 --------- 7 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index b0adb95..3418fdc 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -24,6 +24,7 @@ cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator() this->WindowsShell = true; this->IncludeDirective = "!include"; this->DefineWindowsNULL = true; + this->PassMakeflags = true; } @@ -46,7 +47,6 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator( cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakefileVariableSize(32); - lg->SetPassMakeflags(true); lg->SetUnixCD(false); lg->SetMakeCommandEscapeTargetTwice(true); lg->SetBorlandMakeCurlyHack(true); diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 35d20ed..45a7d3e 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -22,6 +22,7 @@ cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator() this->WindowsShell = true; this->NMake = true; this->DefineWindowsNULL = true; + this->PassMakeflags = true; } void cmGlobalJOMMakefileGenerator @@ -55,7 +56,6 @@ cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("/nologo"); lg->SetIgnoreLibPrefix(true); - lg->SetPassMakeflags(true); lg->SetUnixCD(false); return lg; } diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index c059ba0..a509931 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -22,6 +22,7 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator() this->WindowsShell = true; this->NMake = true; this->DefineWindowsNULL = true; + this->PassMakeflags = true; } void cmGlobalNMakeMakefileGenerator @@ -55,7 +56,6 @@ cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("/nologo"); lg->SetIgnoreLibPrefix(true); - lg->SetPassMakeflags(true); lg->SetUnixCD(false); return lg; } diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index fd9b851..7588c09 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -36,6 +36,7 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3() this->IncludeDirective = "include"; this->DefineWindowsNULL = false; + this->PassMakeflags = false; } void cmGlobalUnixMakefileGenerator3 diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index ffe65a0..2a91ed4 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -135,6 +135,7 @@ public: std::string IncludeDirective; bool DefineWindowsNULL; + bool PassMakeflags; protected: void WriteMainMakefile2(); void WriteMainCMakefile(); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 39b35a4..cb4d8cf 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -85,7 +85,6 @@ cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent) { this->MakefileVariableSize = 0; this->IgnoreLibPrefix = false; - this->PassMakeflags = false; this->UnixCD = true; this->ColorMakefile = false; this->SkipPreprocessedSourceRules = false; @@ -2154,7 +2153,9 @@ cmLocalUnixMakefileGenerator3 // sub-invoked makes via an environment variable. However, some // makes do not support that, so you have to pass the flags // explicitly. - if(this->GetPassMakeflags()) + cmGlobalUnixMakefileGenerator3* gg = + static_cast(this->GlobalGenerator); + if(gg->PassMakeflags) { cmd += "-$(MAKEFLAGS) "; } diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 37a9265..7a0dadb 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -67,14 +67,6 @@ public: void WriteMakeVariables(std::ostream& makefileStream); /** - * If true, then explicitly pass MAKEFLAGS on the make all target for makes - * that do not use environment variables. - * - */ - void SetPassMakeflags(bool s){this->PassMakeflags = s;} - bool GetPassMakeflags() { return this->PassMakeflags; } - - /** * Set the flag used to keep the make program silent. */ void SetMakeSilentFlag(const std::string& s) { this->MakeSilentFlag = s; } @@ -291,7 +283,6 @@ private: std::string MakeSilentFlag; std::string ConfigurationName; bool UnixCD; - bool PassMakeflags; bool MakeCommandEscapeTargetTwice; bool BorlandMakeCurlyHack; //========================================================================== -- cgit v0.12 From 333c1fa83bd20f7b1039ab0a90e442b03d2c27e5 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:21:24 +0200 Subject: cmGlobalUnixMakefileGenerator3: Host the UnixCD. --- Source/cmGlobalBorlandMakefileGenerator.cxx | 2 +- Source/cmGlobalJOMMakefileGenerator.cxx | 2 +- Source/cmGlobalNMakeMakefileGenerator.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 1 + Source/cmGlobalUnixMakefileGenerator3.h | 1 + Source/cmGlobalWatcomWMakeGenerator.cxx | 2 +- Source/cmLocalUnixMakefileGenerator3.cxx | 5 +++-- Source/cmLocalUnixMakefileGenerator3.h | 7 ------- 8 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index 3418fdc..0ee98a8 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -25,6 +25,7 @@ cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator() this->IncludeDirective = "!include"; this->DefineWindowsNULL = true; this->PassMakeflags = true; + this->UnixCD = false; } @@ -47,7 +48,6 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator( cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakefileVariableSize(32); - lg->SetUnixCD(false); lg->SetMakeCommandEscapeTargetTwice(true); lg->SetBorlandMakeCurlyHack(true); return lg; diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 45a7d3e..23c8653 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -23,6 +23,7 @@ cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator() this->NMake = true; this->DefineWindowsNULL = true; this->PassMakeflags = true; + this->UnixCD = false; } void cmGlobalJOMMakefileGenerator @@ -56,7 +57,6 @@ cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("/nologo"); lg->SetIgnoreLibPrefix(true); - lg->SetUnixCD(false); return lg; } diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index a509931..06c97d8 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -23,6 +23,7 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator() this->NMake = true; this->DefineWindowsNULL = true; this->PassMakeflags = true; + this->UnixCD = false; } void cmGlobalNMakeMakefileGenerator @@ -56,7 +57,6 @@ cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("/nologo"); lg->SetIgnoreLibPrefix(true); - lg->SetUnixCD(false); return lg; } diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 7588c09..a43a427 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -37,6 +37,7 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3() this->IncludeDirective = "include"; this->DefineWindowsNULL = false; this->PassMakeflags = false; + this->UnixCD = true; } void cmGlobalUnixMakefileGenerator3 diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 2a91ed4..ac82287 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -136,6 +136,7 @@ public: std::string IncludeDirective; bool DefineWindowsNULL; bool PassMakeflags; + bool UnixCD; protected: void WriteMainMakefile2(); void WriteMainCMakefile(); diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index b97ee66..7bfef74 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -28,6 +28,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator() this->WatcomWMake = true; this->IncludeDirective = "!include"; this->DefineWindowsNULL = true; + this->UnixCD = false; } void cmGlobalWatcomWMakeGenerator @@ -54,7 +55,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent) = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("-h"); lg->SetIgnoreLibPrefix(true); - lg->SetUnixCD(false); return lg; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index cb4d8cf..1ba6656 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -85,7 +85,6 @@ cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent) { this->MakefileVariableSize = 0; this->IgnoreLibPrefix = false; - this->UnixCD = true; this->ColorMakefile = false; this->SkipPreprocessedSourceRules = false; this->SkipAssemblySourceRules = false; @@ -2347,7 +2346,9 @@ void cmLocalUnixMakefileGenerator3 // support changing the drive letter with just "d:"). const char* cd_cmd = this->IsMinGWMake() ? "cd /d " : "cd "; - if(!this->UnixCD) + cmGlobalUnixMakefileGenerator3* gg = + static_cast(this->GlobalGenerator); + if(!gg->UnixCD) { // On Windows we must perform each step separately and then change // back because the shell keeps the working directory between diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 7a0dadb..577b3e1 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -73,12 +73,6 @@ public: std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; } /** - * If set to true, cd dir && command is used to - * run commands in a different directory. - */ - void SetUnixCD(bool v) {this->UnixCD = v;} - - /** * Set max makefile variable size, default is 0 which means unlimited. */ void SetMakefileVariableSize(int s) { this->MakefileVariableSize = s; } @@ -282,7 +276,6 @@ private: int MakefileVariableSize; std::string MakeSilentFlag; std::string ConfigurationName; - bool UnixCD; bool MakeCommandEscapeTargetTwice; bool BorlandMakeCurlyHack; //========================================================================== -- cgit v0.12 From 2047144f490113905004cc9d5b548e25312fac04 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:21:51 +0200 Subject: cmLocalGenerator: Remove unused IgnoreLibPrefix. --- Source/cmGlobalJOMMakefileGenerator.cxx | 1 - Source/cmGlobalMSYSMakefileGenerator.cxx | 1 - Source/cmGlobalMinGWMakefileGenerator.cxx | 1 - Source/cmGlobalNMakeMakefileGenerator.cxx | 1 - Source/cmGlobalWatcomWMakeGenerator.cxx | 1 - Source/cmLocalGenerator.cxx | 1 - Source/cmLocalGenerator.h | 1 - Source/cmLocalUnixMakefileGenerator3.cxx | 1 - Source/cmLocalUnixMakefileGenerator3.h | 6 ------ 9 files changed, 14 deletions(-) diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 23c8653..799c9fb 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -56,7 +56,6 @@ cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("/nologo"); - lg->SetIgnoreLibPrefix(true); return lg; } diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index d34df8b..539a08b 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -99,7 +99,6 @@ cmGlobalMSYSMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetIgnoreLibPrefix(true); return lg; } diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index 0268624..cda8cf2 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -64,7 +64,6 @@ cmGlobalMinGWMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetIgnoreLibPrefix(true); return lg; } diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 06c97d8..771ae24 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -56,7 +56,6 @@ cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("/nologo"); - lg->SetIgnoreLibPrefix(true); return lg; } diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 7bfef74..97bc253 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -54,7 +54,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent) cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); lg->SetMakeSilentFlag("-h"); - lg->SetIgnoreLibPrefix(true); return lg; } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 74362ae..29990af 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -62,7 +62,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, this->Makefile = new cmMakefile(this); this->LinkScriptShell = false; - this->IgnoreLibPrefix = false; this->UseRelativePaths = false; this->Configured = false; this->EmitUniversalBinaryFlags = true; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index fa2f712..c7deeb7 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -470,7 +470,6 @@ protected: bool LinkScriptShell; bool UseRelativePaths; - bool IgnoreLibPrefix; bool Configured; bool EmitUniversalBinaryFlags; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 1ba6656..ebf3d45 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -84,7 +84,6 @@ cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent) : cmLocalGenerator(gg, parent) { this->MakefileVariableSize = 0; - this->IgnoreLibPrefix = false; this->ColorMakefile = false; this->SkipPreprocessedSourceRules = false; this->SkipAssemblySourceRules = false; diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 577b3e1..f70af13 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -78,12 +78,6 @@ public: void SetMakefileVariableSize(int s) { this->MakefileVariableSize = s; } /** - * If ignore lib prefix is true, then do not strip lib from the name - * of a library. - */ - void SetIgnoreLibPrefix(bool s) { this->IgnoreLibPrefix = s; } - - /** * Set whether passing a make target on a command line requires an * extra level of escapes. */ -- cgit v0.12 From 684e5cefb239263f39089cacbffba28d4c61251a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:23:06 +0200 Subject: cmGlobalGenerator: Host the MakeSilentFlag. --- Source/cmGlobalGenerator.h | 1 + Source/cmGlobalJOMMakefileGenerator.cxx | 2 +- Source/cmGlobalNMakeMakefileGenerator.cxx | 2 +- Source/cmGlobalWatcomWMakeGenerator.cxx | 2 +- Source/cmLocalUnixMakefileGenerator3.cxx | 8 ++++---- Source/cmLocalUnixMakefileGenerator3.h | 7 ------- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 9ac741d..c9bb9b4 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -353,6 +353,7 @@ public: cmFileLockPool& GetFileLockPool() { return FileLockPool; } #endif + std::string MakeSilentFlag; bool WindowsShell; bool WindowsVSIDE; bool WatcomWMake; diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 799c9fb..9f0698d 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -24,6 +24,7 @@ cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator() this->DefineWindowsNULL = true; this->PassMakeflags = true; this->UnixCD = false; + this->MakeSilentFlag = "/nologo"; } void cmGlobalJOMMakefileGenerator @@ -55,7 +56,6 @@ cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetMakeSilentFlag("/nologo"); return lg; } diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 771ae24..b84a791 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -24,6 +24,7 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator() this->DefineWindowsNULL = true; this->PassMakeflags = true; this->UnixCD = false; + this->MakeSilentFlag = "/nologo"; } void cmGlobalNMakeMakefileGenerator @@ -55,7 +56,6 @@ cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetMakeSilentFlag("/nologo"); return lg; } diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 97bc253..6867a0b 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -29,6 +29,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator() this->IncludeDirective = "!include"; this->DefineWindowsNULL = true; this->UnixCD = false; + this->MakeSilentFlag = "-h"; } void cmGlobalWatcomWMakeGenerator @@ -53,7 +54,6 @@ cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent) { cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3(this, parent); - lg->SetMakeSilentFlag("-h"); return lg; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index ebf3d45..696b043 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2140,10 +2140,12 @@ cmLocalUnixMakefileGenerator3 cmd += this->Convert(makefile,NONE,SHELL); cmd += " "; + cmGlobalUnixMakefileGenerator3* gg = + static_cast(this->GlobalGenerator); // Pass down verbosity level. - if(!this->GetMakeSilentFlag().empty()) + if(!gg->MakeSilentFlag.empty()) { - cmd += this->GetMakeSilentFlag(); + cmd += gg->MakeSilentFlag; cmd += " "; } @@ -2151,8 +2153,6 @@ cmLocalUnixMakefileGenerator3 // sub-invoked makes via an environment variable. However, some // makes do not support that, so you have to pass the flags // explicitly. - cmGlobalUnixMakefileGenerator3* gg = - static_cast(this->GlobalGenerator); if(gg->PassMakeflags) { cmd += "-$(MAKEFLAGS) "; diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index f70af13..0b056ff 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -67,12 +67,6 @@ public: void WriteMakeVariables(std::ostream& makefileStream); /** - * Set the flag used to keep the make program silent. - */ - void SetMakeSilentFlag(const std::string& s) { this->MakeSilentFlag = s; } - std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; } - - /** * Set max makefile variable size, default is 0 which means unlimited. */ void SetMakefileVariableSize(int s) { this->MakefileVariableSize = s; } @@ -268,7 +262,6 @@ private: //========================================================================== // Configuration settings. int MakefileVariableSize; - std::string MakeSilentFlag; std::string ConfigurationName; bool MakeCommandEscapeTargetTwice; bool BorlandMakeCurlyHack; -- cgit v0.12 From 036372c4cdee3d52289a46cbd55b40f685a25c02 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 16 May 2015 05:25:21 +0200 Subject: Remove obsolete overrides of CreateLocalGenerator. The cmGlobalMakefileGenerator3 has an identical implementation. --- Source/cmGlobalJOMMakefileGenerator.cxx | 9 --------- Source/cmGlobalJOMMakefileGenerator.h | 3 --- Source/cmGlobalMSYSMakefileGenerator.cxx | 9 --------- Source/cmGlobalMSYSMakefileGenerator.h | 3 --- Source/cmGlobalMinGWMakefileGenerator.cxx | 9 --------- Source/cmGlobalMinGWMakefileGenerator.h | 3 --- Source/cmGlobalNMakeMakefileGenerator.cxx | 9 --------- Source/cmGlobalNMakeMakefileGenerator.h | 3 --- Source/cmGlobalWatcomWMakeGenerator.cxx | 9 --------- Source/cmGlobalWatcomWMakeGenerator.h | 3 --- 10 files changed, 60 deletions(-) diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 9f0698d..3ddbeb6 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -50,15 +50,6 @@ void cmGlobalJOMMakefileGenerator this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } -///! Create a local generator appropriate to this Global Generator -cmLocalGenerator * -cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) -{ - cmLocalUnixMakefileGenerator3* lg - = new cmLocalUnixMakefileGenerator3(this, parent); - return lg; -} - //---------------------------------------------------------------------------- void cmGlobalJOMMakefileGenerator ::GetDocumentation(cmDocumentationEntry& entry) diff --git a/Source/cmGlobalJOMMakefileGenerator.h b/Source/cmGlobalJOMMakefileGenerator.h index 4831309..fa596f6 100644 --- a/Source/cmGlobalJOMMakefileGenerator.h +++ b/Source/cmGlobalJOMMakefileGenerator.h @@ -36,9 +36,6 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0); - /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index 539a08b..fe3321e 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -93,15 +93,6 @@ void cmGlobalMSYSMakefileGenerator } } -///! Create a local generator appropriate to this Global Generator -cmLocalGenerator * -cmGlobalMSYSMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) -{ - cmLocalUnixMakefileGenerator3* lg = - new cmLocalUnixMakefileGenerator3(this, parent); - return lg; -} - //---------------------------------------------------------------------------- void cmGlobalMSYSMakefileGenerator ::GetDocumentation(cmDocumentationEntry& entry) diff --git a/Source/cmGlobalMSYSMakefileGenerator.h b/Source/cmGlobalMSYSMakefileGenerator.h index 1795d86..4d5ee1e 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.h +++ b/Source/cmGlobalMSYSMakefileGenerator.h @@ -35,9 +35,6 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0); - /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index cda8cf2..17a7301 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -58,15 +58,6 @@ void cmGlobalMinGWMakefileGenerator this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } -///! Create a local generator appropriate to this Global Generator -cmLocalGenerator * -cmGlobalMinGWMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) -{ - cmLocalUnixMakefileGenerator3* lg = - new cmLocalUnixMakefileGenerator3(this, parent); - return lg; -} - //---------------------------------------------------------------------------- void cmGlobalMinGWMakefileGenerator ::GetDocumentation(cmDocumentationEntry& entry) diff --git a/Source/cmGlobalMinGWMakefileGenerator.h b/Source/cmGlobalMinGWMakefileGenerator.h index 93f67be..5543d12 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.h +++ b/Source/cmGlobalMinGWMakefileGenerator.h @@ -34,9 +34,6 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0); - /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index b84a791..6152b29 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -50,15 +50,6 @@ void cmGlobalNMakeMakefileGenerator this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } -///! Create a local generator appropriate to this Global Generator -cmLocalGenerator * -cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent) -{ - cmLocalUnixMakefileGenerator3* lg = - new cmLocalUnixMakefileGenerator3(this, parent); - return lg; -} - //---------------------------------------------------------------------------- void cmGlobalNMakeMakefileGenerator ::GetDocumentation(cmDocumentationEntry& entry) diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index cb898ba..69e5084 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -34,9 +34,6 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0); - /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 6867a0b..062091f 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -48,15 +48,6 @@ void cmGlobalWatcomWMakeGenerator this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } -///! Create a local generator appropriate to this Global Generator -cmLocalGenerator * -cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent) -{ - cmLocalUnixMakefileGenerator3* lg - = new cmLocalUnixMakefileGenerator3(this, parent); - return lg; -} - //---------------------------------------------------------------------------- void cmGlobalWatcomWMakeGenerator ::GetDocumentation(cmDocumentationEntry& entry) diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index 3af2f9d..b733324 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -34,9 +34,6 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0); - /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. -- cgit v0.12