diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmDepends.cxx | 7 | ||||
-rw-r--r-- | Source/cmDependsC.cxx | 12 | ||||
-rw-r--r-- | Source/cmDependsFortran.cxx | 35 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 7 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 4 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.h | 4 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.h | 8 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.h | 8 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.h | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.h | 7 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.h | 9 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 4 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmMakefileUtilityTargetGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmake.cxx | 2 |
21 files changed, 63 insertions, 71 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c034126..769ab83 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 0) -set(CMake_VERSION_PATCH 20140721) +set(CMake_VERSION_PATCH 20140728) #set(CMake_VERSION_RC 1) diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index 50a395e..134f45b 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -58,12 +58,7 @@ bool cmDepends::Write(std::ostream &makeDepends, // Get the source and object file. std::string const& src = *si++; if(si == pairs.end()) { break; } - std::string obj = *si++; - - // Make sure the object file is relative to the top of the build tree. - obj = this->LocalGenerator->Convert(obj, - cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE); + std::string const& obj = *si++; dependencies[obj].insert(src); } for(std::map<std::string, std::set<std::string> >::const_iterator diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index d26d3a9..a1fc268 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -269,14 +269,20 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources, // written by the original local generator for this directory // convert the dependencies to paths relative to the home output // directory. We must do the same here. - internalDepends << obj << std::endl; + std::string obj_i = + this->LocalGenerator->Convert(obj, cmLocalGenerator::HOME_OUTPUT); + std::string obj_m = + this->LocalGenerator->ConvertToOutputFormat(obj_i, + cmLocalGenerator::MAKERULE); + internalDepends << obj_i << std::endl; + for(std::set<std::string>::const_iterator i=dependencies.begin(); i != dependencies.end(); ++i) { - makeDepends << obj << ": " << + makeDepends << obj_m << ": " << this->LocalGenerator->Convert(*i, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE) + cmLocalGenerator::MAKERULE) << std::endl; internalDepends << " " << *i << std::endl; } diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index f06971d..8fc8347 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -443,15 +443,20 @@ cmDependsFortran const char* src = info.Source.c_str(); // Write the include dependencies to the output stream. - internalDepends << obj << std::endl; + std::string obj_i = + this->LocalGenerator->Convert(obj, cmLocalGenerator::HOME_OUTPUT); + std::string obj_m = + this->LocalGenerator->ConvertToOutputFormat(obj_i, + cmLocalGenerator::MAKERULE); + internalDepends << obj_i << std::endl; internalDepends << " " << src << std::endl; for(std::set<std::string>::const_iterator i = info.Includes.begin(); i != info.Includes.end(); ++i) { - makeDepends << obj << ": " << + makeDepends << obj_m << ": " << this->LocalGenerator->Convert(*i, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE) + cmLocalGenerator::MAKERULE) << std::endl; internalDepends << " " << *i << std::endl; } @@ -482,10 +487,10 @@ cmDependsFortran proxy += ".mod.proxy"; proxy = this->LocalGenerator->Convert(proxy, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::MAKERULE); // since we require some things add them to our list of requirements - makeDepends << obj << ".requires: " << proxy << std::endl; + makeDepends << obj_m << ".requires: " << proxy << std::endl; } // The object file should depend on timestamped files for the @@ -499,8 +504,8 @@ cmDependsFortran std::string stampFile = this->LocalGenerator->Convert(required->second, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE); - makeDepends << obj << ": " << stampFile << "\n"; + cmLocalGenerator::MAKERULE); + makeDepends << obj_m << ": " << stampFile << "\n"; } else { @@ -512,8 +517,8 @@ cmDependsFortran module = this->LocalGenerator->Convert(module, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE); - makeDepends << obj << ": " << module << "\n"; + cmLocalGenerator::MAKERULE); + makeDepends << obj_m << ": " << module << "\n"; } } } @@ -528,8 +533,8 @@ cmDependsFortran proxy += ".mod.proxy"; proxy = this->LocalGenerator->Convert(proxy, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE); - makeDepends << proxy << ": " << obj << ".provides" << std::endl; + cmLocalGenerator::MAKERULE); + makeDepends << proxy << ": " << obj_m << ".provides" << std::endl; } // If any modules are provided then they must be converted to stamp files. @@ -537,7 +542,7 @@ cmDependsFortran { // Create a target to copy the module after the object file // changes. - makeDepends << obj << ".provides.build:\n"; + makeDepends << obj_m << ".provides.build:\n"; for(std::set<std::string>::const_iterator i = info.Provides.begin(); i != info.Provides.end(); ++i) { @@ -575,7 +580,7 @@ cmDependsFortran } // After copying the modules update the timestamp file so that // copying will not be done again until the source rebuilds. - makeDepends << "\t$(CMAKE_COMMAND) -E touch " << obj + makeDepends << "\t$(CMAKE_COMMAND) -E touch " << obj_m << ".provides.build\n"; // Make sure the module timestamp rule is evaluated by the time @@ -584,8 +589,8 @@ cmDependsFortran driver += "/build"; driver = this->LocalGenerator->Convert(driver, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE); - makeDepends << driver << ": " << obj << ".provides.build\n"; + cmLocalGenerator::MAKERULE); + makeDepends << driver << ": " << obj_m << ".provides.build\n"; } return true; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6d737b1..ae6861e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1153,7 +1153,7 @@ bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const return false; } -void cmGlobalGenerator::Generate() +void cmGlobalGenerator::DoGenerate() { // Some generators track files replaced during the Generate. // Start with an empty vector: @@ -1162,6 +1162,11 @@ void cmGlobalGenerator::Generate() // clear targets to issue warning CMP0042 for this->CMP0042WarnTargets.clear(); + this->Generate(); +} + +void cmGlobalGenerator::Generate() +{ // Check whether this generator is allowed to run. if(!this->CheckALLOW_DUPLICATE_CUSTOM_TARGETS()) { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index ee3f269..6b608bb 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -80,7 +80,7 @@ public: * basically creates a series of LocalGenerators for each directory and * requests that they Generate. */ - virtual void Generate(); + void DoGenerate(); /** * Set/Get and Clear the enabled languages. @@ -338,6 +338,8 @@ public: bool GenerateCPackPropertiesFile(); protected: + virtual void Generate(); + typedef std::vector<cmLocalGenerator*> GeneratorVector; // for a project collect all its targets by following depend // information, and also collect all the targets diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index ff110d7..4cbbeea 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -182,9 +182,6 @@ public: /// Overloaded methods. @see cmGlobalGenerator::GetDocumentation() static void GetDocumentation(cmDocumentationEntry& entry); - /// Overloaded methods. @see cmGlobalGenerator::Generate() - virtual void Generate(); - /// Overloaded methods. @see cmGlobalGenerator::EnableLanguage() virtual void EnableLanguage(std::vector<std::string>const& languages, cmMakefile* mf, @@ -302,6 +299,9 @@ public: virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; protected: + /// Overloaded methods. @see cmGlobalGenerator::Generate() + virtual void Generate(); + /// Overloaded methods. /// @see cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const { return true; } diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 8dae81b..3478534 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -530,7 +530,7 @@ cmGlobalUnixMakefileGenerator3 // Begin the directory-level rules section. std::string dir = lg->GetMakefile()->GetStartOutputDirectory(); dir = lg->Convert(dir, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE); + cmLocalGenerator::MAKERULE); lg->WriteDivider(ruleFileStream); ruleFileStream << "# Directory level rules for directory " diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index cb639dd..9f154e9 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -47,8 +47,6 @@ public: ///! create the correct local generator virtual cmLocalGenerator *CreateLocalGenerator(); - virtual void Generate(); - /** * Try to determine system infomation such as shared library * extension, pthreads, byte order etc. @@ -93,6 +91,8 @@ public: virtual void FindMakeProgram(cmMakefile*); protected: + virtual void Generate(); + virtual const char* GetIDEVersion() { return "10.0"; } std::string const& GetMSBuildCommand(); diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index b2fd28f..57c2660 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -64,13 +64,6 @@ public: ); /** - * Generate the all required files for building this project/tree. This - * basically creates a series of LocalGenerators for each directory and - * requests that they Generate. - */ - virtual void Generate(); - - /** * Generate the DSW workspace file. */ virtual void OutputDSWFile(); @@ -94,6 +87,7 @@ public: virtual bool IsForVS6() const { return true; } protected: + virtual void Generate(); virtual const char* GetIDEVersion() { return "6.0"; } private: virtual std::string GetVSMakeProgram() { return this->GetMSDevCommand(); } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 602d678..3d79357 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -773,7 +773,6 @@ void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, const char* typeGuid, const std::set<std::string>&) { - std::string d = cmSystemTools::ConvertToOutputPath(location); fout << "Project(" << "\"{" << (typeGuid ? typeGuid : this->ExternalProjectType(location)) diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index bd84433..390b97c 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -72,13 +72,6 @@ public: ); /** - * Generate the all required files for building this project/tree. This - * basically creates a series of LocalGenerators for each directory and - * requests that they Generate. - */ - virtual void Generate(); - - /** * Generate the DSW workspace file. */ virtual void OutputSLNFile(); @@ -113,6 +106,7 @@ public: virtual std::string Encoding(); protected: + virtual void Generate(); virtual const char* GetIDEVersion() { return "7.0"; } std::string const& GetDevEnvCommand(); diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index aea2f01..d7e1f3a 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -45,7 +45,6 @@ public: * target. */ virtual void Configure(); - virtual void Generate(); /** * Where does this version of Visual Studio look for macros for the @@ -69,6 +68,7 @@ public: return !this->WindowsCEVersion.empty(); } protected: + virtual void Generate(); virtual const char* GetIDEVersion() { return "8.0"; } virtual std::string FindDevEnvCommand(); diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 05dbb11..356f4d4 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -27,11 +27,6 @@ public: virtual ~cmGlobalVisualStudioGenerator(); /** - * Basic generate implementation for all VS generators. - */ - virtual void Generate(); - - /** * Configure CMake's Visual Studio macros file into the user's Visual * Studio macros directory. */ @@ -90,6 +85,8 @@ public: void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; protected: + virtual void Generate(); + // Does this VS version link targets to each other if there are // dependencies in the SLN file? This was done for VS versions // below 8. diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index ae23e3b..fcdd349 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -64,13 +64,6 @@ public: std::vector<std::string> const& makeOptions = std::vector<std::string>() ); - /** - * Generate the all required files for building this project/tree. This - * basically creates a series of LocalGenerators for each directory and - * requests that they Generate. - */ - virtual void Generate(); - /** Append the subdirectory for the given configuration. */ virtual void AppendDirectoryForConfig(const std::string& prefix, const std::string& config, @@ -91,6 +84,8 @@ public: virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf); void AppendFlag(std::string& flags, std::string const& flag); +protected: + virtual void Generate(); private: cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget, cmSourceGroup* sg); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5380d06..4bd9191 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -681,7 +681,7 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, objVector.push_back(ofname); this->AddCustomCommandToCreateObject(ofname.c_str(), llang, *(*i), target); - objs += this->Convert(ofname,START_OUTPUT,MAKEFILE); + objs += this->Convert(ofname,START_OUTPUT,SHELL); objs += " "; } } @@ -2755,7 +2755,7 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const std::string& source, { std::string result = source; // Convert it to an output path. - if (output == MAKEFILE) + if (output == MAKERULE) { result = cmSystemTools::ConvertToOutputPath(result.c_str()); } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index ad73073..b25b9ab 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -106,7 +106,7 @@ public: * path setting */ enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT }; - enum OutputFormat { UNCHANGED, MAKEFILE, SHELL, WATCOMQUOTE, RESPONSE }; + enum OutputFormat { UNCHANGED, MAKERULE, SHELL, WATCOMQUOTE, RESPONSE }; std::string ConvertToOutputFormat(const std::string& source, OutputFormat output); std::string Convert(const std::string& remote, RelativeRoot local, diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 94e45e5..23513fa 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -630,7 +630,7 @@ cmLocalUnixMakefileGenerator3 // Construct the left hand side of the rule. replace = target; - std::string tgt = this->Convert(replace,HOME_OUTPUT,MAKEFILE); + std::string tgt = this->Convert(replace,HOME_OUTPUT,MAKERULE); const char* space = ""; if(tgt.size() == 1) { @@ -663,7 +663,7 @@ cmLocalUnixMakefileGenerator3 dep != depends.end(); ++dep) { replace = *dep; - replace = this->Convert(replace,HOME_OUTPUT,MAKEFILE); + replace = this->Convert(replace,HOME_OUTPUT,MAKERULE); os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n"; } } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 403f6e6..758c8e4 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -218,7 +218,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->LocalGenerator->IncludeDirective << " " << root << this->Convert(dependFileNameFull, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE) + cmLocalGenerator::MAKERULE) << "\n\n"; if(!this->NoRuleMessages) @@ -229,7 +229,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->LocalGenerator->IncludeDirective << " " << root << this->Convert(this->ProgressFileNameFull, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE) + cmLocalGenerator::MAKERULE) << "\n\n"; } @@ -262,7 +262,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << this->LocalGenerator->IncludeDirective << " " << root << this->Convert(this->FlagFileNameFull, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE) + cmLocalGenerator::MAKERULE) << "\n\n"; } diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 6b039bb..617214f 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -54,7 +54,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() << this->LocalGenerator->IncludeDirective << " " << root << this->Convert(this->ProgressFileNameFull, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKEFILE) + cmLocalGenerator::MAKERULE) << "\n\n"; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index a051c87..5aa1ab0 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1715,7 +1715,7 @@ int cmake::Generate() { return -1; } - this->GlobalGenerator->Generate(); + this->GlobalGenerator->DoGenerate(); if ( !this->GraphVizFile.empty() ) { std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl; |