diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 13 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 12 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 3 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 2 |
6 files changed, 23 insertions, 13 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 716f229..e1b62e9 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,4 +2,4 @@ set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 1) set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_RC 1) +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/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/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ae0e807..2f4d9bb 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2362,7 +2362,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) depends.push_back(this->GetAllTargetName()); } } - if(mf->GetDefinition("CMake_BINARY_DIR")) + if(mf->GetDefinition("CMake_BINARY_DIR") && + !mf->IsOn("CMAKE_CROSSCOMPILING")) { // We are building CMake itself. We cannot use the original // executable to install over itself. The generator will diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 26fc317..8109b16 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -326,9 +326,9 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("<PropertyGroup Label=\"NsightTegraProject\">\n", 1); if(this->NsightTegraVersion[0] >= 2) { - // Nsight Tegra 2.0 uses project revision 8. + // Nsight Tegra 2.0 uses project revision 9. this->WriteString("<NsightTegraProjectRevisionNumber>" - "8" + "9" "</NsightTegraProjectRevisionNumber>\n", 2); // Tell newer versions to upgrade silently when loading. this->WriteString("<NsightTegraUpgradeOnceWithoutPrompt>" 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. |