From dc0f9bc5f28bdd785b3bc4ea6c9bfe5c945e5058 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sun, 3 Aug 2014 18:41:28 +0200 Subject: [PATCH] Imported Upstream version 2.8.12.2 --- ChangeLog.manual | 17 +++++++++++++++++ Modules/CMakeDetermineCompilerId.cmake | 2 +- Modules/FindOpenMP.cmake | 9 +++++---- Source/CMakeVersion.cmake | 2 +- Source/cmGlobalNinjaGenerator.cxx | 3 --- Source/cmGlobalXCodeGenerator.cxx | 6 ++++-- Source/cmLocalVisualStudio7Generator.cxx | 2 ++ Source/cmMakefileExecutableTargetGenerator.cxx | 12 +++++------- Source/cmMakefileLibraryTargetGenerator.cxx | 12 +++++------- Source/cmMakefileTargetGenerator.cxx | 2 +- Source/cmNinjaTargetGenerator.cxx | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 4 +++- 12 files changed, 45 insertions(+), 28 deletions(-) diff --git a/ChangeLog.manual b/ChangeLog.manual index 5d2dc8b31..b389d8bdb 100644 --- a/ChangeLog.manual +++ b/ChangeLog.manual @@ -1,3 +1,20 @@ +Changes in CMake 2.8.12.2 (since 2.8.12.1) +------------------------------------------ +Brad King (4): + VS: Map /Fd to ProgramDataBaseFileName for VS 7,8,9 (#14577) + Replace rule placeholder consistently (#14667) + VS: Convert include path to backslashes for VS >= 10 + Revert "Ninja: Track configured files so we can regenerate them." + +Rolf Eike Beer (1): + FindOpenMP: fix detecting compilers that do not need any special flag (#14567) + +Ruslan Baratov (1): + Xcode: Fix storyboard view + +Ted Kremenek (1): + CMakeDetermineCompilerId: Fix compiler line match for Xcode 5.1 + Changes in CMake 2.8.12.1 (since 2.8.12) ---------------------------------------- Brad King (9): diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 8ca53348b..dd0c2bdcf 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -209,7 +209,7 @@ Id flags: ${testflags} # ... # /path/to/cc ...CompilerId${lang}/... # to extract the compiler front-end for the language. - if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/\\./CompilerId${lang}[ \t\n\\\"]") + if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/(\\./)?CompilerId${lang}[ \t\n\\\"]") set(_comp "${CMAKE_MATCH_2}") if(EXISTS "${_comp}") set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE) diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index f4a9f44c6..8afad6822 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -31,6 +31,8 @@ set(_OPENMP_REQUIRED_VARS) function(_OPENMP_FLAG_CANDIDATES LANG) set(OpenMP_FLAG_CANDIDATES + #Empty, if compiler automatically accepts openmp + " " #GNU "-fopenmp" #Microsoft Visual Studio @@ -39,8 +41,6 @@ function(_OPENMP_FLAG_CANDIDATES LANG) "-Qopenmp" #PathScale, Intel "-openmp" - #Empty, if compiler automatically accepts openmp - " " #Sun "-xopenmp" #HP @@ -64,6 +64,7 @@ function(_OPENMP_FLAG_CANDIDATES LANG) set(OMP_FLAG_PGI "-mp") set(OMP_FLAG_SunPro "-xopenmp") set(OMP_FLAG_XL "-qsmp") + set(OMP_FLAG_Cray " ") # Move the flag that matches the compiler to the head of the list, # this is faster and doesn't clutter the output that much. If that @@ -100,7 +101,7 @@ if(CMAKE_C_COMPILER_LOADED) include(${CMAKE_CURRENT_LIST_DIR}/CheckCSourceCompiles.cmake) endif() - foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES}) + foreach(FLAG IN LISTS OpenMP_C_FLAG_CANDIDATES) set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") set(CMAKE_REQUIRED_FLAGS "${FLAG}") unset(OpenMP_FLAG_DETECTED CACHE) @@ -134,7 +135,7 @@ if(CMAKE_CXX_COMPILER_LOADED) set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE}) endif() - foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES}) + foreach(FLAG IN LISTS OpenMP_CXX_FLAG_CANDIDATES) set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") set(CMAKE_REQUIRED_FLAGS "${FLAG}") unset(OpenMP_FLAG_DETECTED CACHE) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 50273701c..fd315ce6c 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 12) -set(CMake_VERSION_TWEAK 1) +set(CMake_VERSION_TWEAK 2) #set(CMake_VERSION_RC 0) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 61d02726e..1953546de 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1094,9 +1094,6 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) { const std::vector& lf = (*i)->GetMakefile()->GetListFiles(); implicitDeps.insert(implicitDeps.end(), lf.begin(), lf.end()); - - const std::vector& of = (*i)->GetMakefile()->GetOutputFiles(); - implicitDeps.insert(implicitDeps.end(), of.begin(), of.end()); } std::sort(implicitDeps.begin(), implicitDeps.end()); implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()), diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 0a2b32b4f..c181c5926 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -877,8 +877,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath( } std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang); - - fileRef->AddAttribute("explicitFileType", + const char* attribute = (sourcecode == "file.storyboard") ? + "lastKnownFileType" : + "explicitFileType"; + fileRef->AddAttribute(attribute, this->CreateString(sourcecode.c_str())); // Store the file path relative to the top of the source tree. diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index bd6c86004..8ffd96eb1 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -477,6 +477,8 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] = {"AssemblerListingLocation", "Fa", "ASM List Location", "", cmVS7FlagTable::UserValue}, + {"ProgramDataBaseFileName", "Fd", "Program Database File Name", "", + cmVS7FlagTable::UserValue}, // boolean flags {"BufferSecurityCheck", "GS", "Buffer security check", "TRUE", 0}, diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index e4219a945..3a71bd6eb 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -338,13 +338,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) vars.CMTarget = this->Target; vars.Language = linkLanguage; vars.Objects = buildObjs.c_str(); - std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash(); - objdir += this->Target->GetName(); - objdir += ".dir"; - objdir = this->Convert(objdir.c_str(), - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); - vars.ObjectDir = objdir.c_str(); + std::string objectDir = this->Target->GetSupportDirectory(); + objectDir = this->Convert(objectDir.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + vars.ObjectDir = objectDir.c_str(); vars.Target = targetOutPathReal.c_str(); vars.TargetPDB = targetOutPathPDB.c_str(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index ea9663f2e..ffe68e5b2 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -577,13 +577,11 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules vars.CMTarget = this->Target; vars.Language = linkLanguage; vars.Objects = buildObjs.c_str(); - std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash(); - objdir += this->Target->GetName(); - objdir += ".dir"; - objdir = this->Convert(objdir.c_str(), - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); - vars.ObjectDir = objdir.c_str(); + std::string objectDir = this->Target->GetSupportDirectory(); + objectDir = this->Convert(objectDir.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + vars.ObjectDir = objectDir.c_str(); vars.Target = targetOutPathReal.c_str(); vars.LinkLibraries = linkLibs.c_str(); vars.ObjectsQuoted = buildObjs.c_str(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 0829cab6a..5e6c54822 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -638,7 +638,7 @@ cmMakefileTargetGenerator cmLocalGenerator::NONE, cmLocalGenerator::SHELL).c_str(); vars.Object = shellObj.c_str(); - std::string objectDir = cmSystemTools::GetFilenamePath(obj); + std::string objectDir = this->Target->GetSupportDirectory(); objectDir = this->Convert(objectDir.c_str(), cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 898aa0e9e..9c8b4810b 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -543,7 +543,7 @@ cmNinjaTargetGenerator vars["DEP_FILE"] = objectFileName + ".d";; EnsureParentDirectoryExists(objectFileName); - std::string objectDir = cmSystemTools::GetFilenamePath(objectFileName); + std::string objectDir = this->Target->GetSupportDirectory(); vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat( ConvertToNinjaPath(objectDir.c_str()).c_str(), cmLocalGenerator::SHELL); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a26b2913a..6376376a0 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1420,7 +1420,9 @@ OutputIncludes(std::vector const & includes) for(std::vector::const_iterator i = includes.begin(); i != includes.end(); ++i) { - *this->BuildFileStream << cmVS10EscapeXML(*i) << ";"; + std::string incDir = *i; + this->ConvertToWindowsSlash(incDir); + *this->BuildFileStream << cmVS10EscapeXML(incDir) << ";"; } this->WriteString("%(AdditionalIncludeDirectories)" "\n", 0);