diff options
Diffstat (limited to 'Source')
23 files changed, 52 insertions, 57 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9c39a11..e1b62e9 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 20141014) -#set(CMake_VERSION_RC 1) +set(CMake_VERSION_MINOR 1) +set(CMake_VERSION_PATCH 0) +set(CMake_VERSION_RC 2) diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index b13a125..1fb8f30 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -263,21 +263,26 @@ cmComputeLinkDepends::Compute() this->OrderLinkEntires(); // Compute the final set of link entries. + // Iterate in reverse order so we can keep only the last occurrence + // of a shared library. std::set<int> emmitted; - for(std::vector<int>::const_iterator li = this->FinalLinkOrder.begin(); - li != this->FinalLinkOrder.end(); ++li) + for(std::vector<int>::const_reverse_iterator + li = this->FinalLinkOrder.rbegin(), + le = this->FinalLinkOrder.rend(); + li != le; ++li) { int i = *li; LinkEntry const& e = this->EntryList[i]; cmTarget const* t = e.Target; - // Entries that we know the linker will re-use for symbols - // needed by later entries do not need to be repeated. + // Entries that we know the linker will re-use do not need to be repeated. bool uniquify = t && t->GetType() == cmTarget::SHARED_LIBRARY; if(!uniquify || emmitted.insert(i).second) { this->FinalLinkEntries.push_back(e); } } + // Reverse the resulting order since we iterated in reverse. + std::reverse(this->FinalLinkEntries.begin(), this->FinalLinkEntries.end()); // Display the final set. if(this->DebugMode) diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index 5515f35..fe32dd5 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -29,7 +29,7 @@ void cmDefinitions::Reset(cmDefinitions* parent) //---------------------------------------------------------------------------- cmDefinitions::Def const& -cmDefinitions::GetInternal(const std::string& key) const +cmDefinitions::GetInternal(const std::string& key) { MapType::const_iterator i = this->Map.find(key); if(i != this->Map.end()) @@ -38,8 +38,9 @@ cmDefinitions::GetInternal(const std::string& key) const } if(cmDefinitions* up = this->Up) { - // Query the parent scope. - return up->GetInternal(key); + // Query the parent scope and store the result locally. + Def def = up->GetInternal(key); + return this->Map.insert(MapType::value_type(key, def)).first->second; } return this->NoDef; } @@ -62,26 +63,13 @@ cmDefinitions::SetInternal(const std::string& key, Def const& def) } //---------------------------------------------------------------------------- -const char* cmDefinitions::Get(const std::string& key) const +const char* cmDefinitions::Get(const std::string& key) { Def const& def = this->GetInternal(key); return def.Exists? def.c_str() : 0; } //---------------------------------------------------------------------------- -void cmDefinitions::Pull(const std::string& key) -{ - if (this->Up) - { - Def const& def = this->Up->GetInternal(key); - if (def.Exists) - { - this->SetInternal(key, def); - } - } -} - -//---------------------------------------------------------------------------- const char* cmDefinitions::Set(const std::string& key, const char* value) { Def const& def = this->SetInternal(key, Def(value)); diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 5209a8b..a2f053f 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -36,11 +36,9 @@ public: /** Returns the parent scope, if any. */ cmDefinitions* GetParent() const { return this->Up; } - /** Get the value associated with a key; null if none. */ - const char* Get(const std::string& key) const; - - /** Pull a variable from the parent. */ - void Pull(const std::string& key); + /** Get the value associated with a key; null if none. + Store the result locally if it came from a parent. */ + const char* Get(const std::string& key); /** Set (or unset if null) a value associated with a key. */ const char* Set(const std::string& key, const char* value); @@ -82,7 +80,7 @@ private: MapType Map; // Internal query and update methods. - Def const& GetInternal(const std::string& key) const; + Def const& GetInternal(const std::string& key); Def const& SetInternal(const std::string& key, Def const& def); // Implementation of Closure() method. diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index c1478df..67a1a6d 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1286,12 +1286,16 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode std::string obj_dir = gt->ObjectDirectory; std::string result; const char* sep = ""; - for(std::map<cmSourceFile const*, std::string>::const_iterator it - = mapping.begin(); it != mapping.end(); ++it) + for(std::vector<cmSourceFile const*>::const_iterator it + = objectSources.begin(); it != objectSources.end(); ++it) { - assert(!it->second.empty()); + // Find the object file name corresponding to this source file. + std::map<cmSourceFile const*, std::string>::const_iterator + map_it = mapping.find(*it); + // It must exist because we populated the mapping just above. + assert(!map_it->second.empty()); result += sep; - std::string objFile = obj_dir + it->second; + std::string objFile = obj_dir + map_it->second; cmSourceFile* sf = context->Makefile->GetOrCreateSource(objFile, true); sf->SetObjectLibrary(tgtName); sf->SetProperty("EXTERNAL_OBJECT", "1"); diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h index 470dea4..120d2f8 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.h +++ b/Source/cmGlobalBorlandMakefileGenerator.h @@ -39,7 +39,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 978f00e..2f4d9bb 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -318,7 +318,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) // will run xcodebuild and if it sees the error text file busy // it will stop forwarding output, and let the build finish. // Then it will retry the build. It will continue this - // untill no text file busy errors occur. + // until no text file busy errors occur. std::string cmakexbuild = this->CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_COMMAND"); cmakexbuild = cmakexbuild.substr(0, cmakexbuild.length()-5); @@ -1008,9 +1008,9 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l, if (sscanf(linkerPref, "%d", &preference)!=1) { // backward compatibility: before 2.6 LINKER_PREFERENCE - // was either "None" or "Prefered", and only the first character was + // was either "None" or "Preferred", and only the first character was // tested. So if there is a custom language out there and it is - // "Prefered", set its preference high + // "Preferred", set its preference high if (linkerPref[0]=='P') { preference = 100; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index f166789..ddd7e91 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -39,7 +39,7 @@ class cmExportBuildFileGenerator; class cmQtAutoGenerators; /** \class cmGlobalGenerator - * \brief Responable for overseeing the generation process for the entire tree + * \brief Responsible for overseeing the generation process for the entire tree * * Subclasses of this class generate makefiles for various * platforms. @@ -94,7 +94,7 @@ public: void ClearEnabledLanguages(); void GetEnabledLanguages(std::vector<std::string>& lang) const; /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, @@ -108,7 +108,7 @@ public: bool optional) const; /** - * Try to determine system infomation, get it from another generator + * Try to determine system information, get it from another generator */ virtual void EnableLanguagesFromGenerator(cmGlobalGenerator *gen, cmMakefile* mf); @@ -198,7 +198,7 @@ public: std::string GetLanguageFromExtension(const char* ext) const; ///! is an extension to be ignored bool IgnoreFile(const char* ext) const; - ///! What is the preference for linkers and this language (None or Prefered) + ///! What is the preference for linkers and this language (None or Preferred) int GetLinkerPreference(const std::string& lang) const; ///! What is the object file extension for a given source file? std::string GetLanguageOutputExtension(cmSourceFile const&) const; diff --git a/Source/cmGlobalJOMMakefileGenerator.h b/Source/cmGlobalJOMMakefileGenerator.h index 344e013..fbb35f3 100644 --- a/Source/cmGlobalJOMMakefileGenerator.h +++ b/Source/cmGlobalJOMMakefileGenerator.h @@ -40,7 +40,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalMSYSMakefileGenerator.h b/Source/cmGlobalMSYSMakefileGenerator.h index c4825bd..baecde7 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.h +++ b/Source/cmGlobalMSYSMakefileGenerator.h @@ -39,7 +39,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalMinGWMakefileGenerator.h b/Source/cmGlobalMinGWMakefileGenerator.h index 4289422..fa8d9f2 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.h +++ b/Source/cmGlobalMinGWMakefileGenerator.h @@ -38,7 +38,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index 2ff44e3..e7b03dd 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -38,7 +38,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index a192eee..f666ee3 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -337,7 +337,7 @@ private: std::string ninjaCmd() const; - /// The file containing the build statement. (the relation ship of the + /// The file containing the build statement. (the relationship of the /// compilation DAG). cmGeneratedFileStream* BuildFileStream; /// The file containing the rule statements. (The action attached to each diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index f44dd12..c61c36e 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -71,7 +71,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 3af7b51..686dcdf 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -49,7 +49,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index 57c2660..58efb25 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -42,7 +42,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 04a74db..201a6a6 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -52,7 +52,7 @@ public: static void GetDocumentation(cmDocumentationEntry& entry); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h index c24d5fe..0a191cd 100644 --- a/Source/cmGlobalVisualStudio9Generator.h +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -32,7 +32,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void WriteSLNHeader(std::ostream& fout); diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index 2057a42..0e577b5 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -38,7 +38,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 4fe04fc..9d7b784 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -44,7 +44,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8806205..0bd1624 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4476,7 +4476,7 @@ void cmMakefile::RaiseScope(const std::string& var, const char *varDef) if(cmDefinitions* up = cur.GetParent()) { // First localize the definition in the current scope. - cur.Pull(var); + cur.Get(var); // Now update the definition in the parent scope. up->Set(var, varDef); diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 8ca4360..2067690 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -265,7 +265,7 @@ STRING(COMPARE EQUAL "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}" KWSYS_IN_SOURCE_BUILD) IF(NOT KWSYS_IN_SOURCE_BUILD) CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsysPrivate.h - ${PROJECT_BINARY_DIR}/kwsysPrivate.h COPY_ONLY IMMEDIATE) + ${PROJECT_BINARY_DIR}/kwsysPrivate.h COPYONLY IMMEDIATE) ENDIF(NOT KWSYS_IN_SOURCE_BUILD) # Select plugin module file name convention. diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 84b5f39..c4aeb47 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -3913,7 +3913,7 @@ bool SystemInformationImplementation::QueryCygwinMemory() bool SystemInformationImplementation::QueryAIXMemory() { -#if defined(_AIX) +#if defined(_AIX) && defined(_SC_AIX_REALMEM) long c = sysconf(_SC_AIX_REALMEM); if (c <= 0) { |