[Cmake-commits] CMake branch, next, updated. v2.8.9-683-g1d2dc55

Brad King brad.king at kitware.com
Fri Sep 21 11:26:26 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  1d2dc553d3cd139bd64a0e31d2d031ae8b5ff554 (commit)
       via  242f673829d40456bd1bcf3f52e10171bccd6868 (commit)
       via  a1c032b99477b1cd29be0e196187c5b878d00d5f (commit)
       via  230ea218a76df931b31394998f121eb34ba8f5ff (commit)
       via  a0a0877a1eb111d37ac4766a368206e73458489e (commit)
       via  33a60e6bd148479c63734286417f582444bf36b6 (commit)
       via  bb18bb7f55327a40ce3f6585d9756f7a25dea2e8 (commit)
      from  a3046d7e80df252fcc02c2c68130d9093074120b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d2dc553d3cd139bd64a0e31d2d031ae8b5ff554
commit 1d2dc553d3cd139bd64a0e31d2d031ae8b5ff554
Merge: a3046d7 242f673
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 21 11:26:24 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 21 11:26:24 2012 -0400

    Merge topic 'osx-sysroot-cleanup' into next
    
    242f673 Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file
    a1c032b bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot
    230ea21 OS X: Improve default CMAKE_OSX_SYSROOT selection
    a0a0877 OS X: Always generate -isysroot if any SDK is in use
    33a60e6 Xcode: Remove unused code reading CMAKE_OSX_SYSROOT_DEFAULT
    bb18bb7 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=242f673829d40456bd1bcf3f52e10171bccd6868
commit 242f673829d40456bd1bcf3f52e10171bccd6868
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 21 10:34:10 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 21 11:15:23 2012 -0400

    Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file
    
    On OS X if the user-provided flags do not include -isysroot and
    CMAKE_OSX_SYSROOT is defined then add the proper -isysroot flag to the C
    compiler invocation we use to generate the .s file.

diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt
index 94a6325..bb4bccc 100644
--- a/Tests/Assembler/CMakeLists.txt
+++ b/Tests/Assembler/CMakeLists.txt
@@ -12,6 +12,9 @@ if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode" AND
   if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|Clang|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel"  AND  UNIX))
     set(C_FLAGS "${CMAKE_C_FLAGS}")
     separate_arguments(C_FLAGS)
+    if(CMAKE_OSX_SYSROOT AND CMAKE_C_SYSROOT_FLAG AND NOT ";${C_FLAGS};" MATCHES ";${CMAKE_C_SYSROOT_FLAG};")
+      list(APPEND C_FLAGS ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT})
+    endif()
     set(SRCS main.s)
     add_custom_command(
       OUTPUT main.s

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1c032b99477b1cd29be0e196187c5b878d00d5f
commit a1c032b99477b1cd29be0e196187c5b878d00d5f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 21 10:06:00 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 21 10:06:00 2012 -0400

    bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot
    
    In order to bootstrap on OS X with Xcode without the command line tools
    one must add -isysroot to CFLAGS and CXXFLAGS.  In this case the flags
    will make it into the configured CMake.  Set CMAKE_OSX_SYSROOT to empty
    in the initial cache to prevent CMake from adding -isysroot again.

diff --git a/bootstrap b/bootstrap
index 23134d0..ceddfdc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1505,6 +1505,14 @@ set (CMAKE_MAN_DIR "'"${cmake_man_dir}"'" CACHE PATH "Install location for man p
 set (CMAKE_DATA_DIR "'"${cmake_data_dir}"'" CACHE PATH "Install location for data (relative to prefix)." FORCE)
 ' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
 
+# Suppress -isysroot if user-provided flags already have it.
+if echo "${cmake_c_flags}"   | grep isysroot >/dev/null 2>&1 &&
+   echo "${cmake_cxx_flags}" | grep isysroot >/dev/null 2>&1; then
+  echo '
+set(CMAKE_OSX_SYSROOT "" CACHE PATH "" FORCE)
+' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
+fi
+
 # Add configuration settings given as command-line options.
 if [ "x${cmake_bootstrap_qt_gui}" != "x" ]; then
   echo '

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=230ea218a76df931b31394998f121eb34ba8f5ff
commit 230ea218a76df931b31394998f121eb34ba8f5ff
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 21 08:59:01 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 21 08:59:01 2012 -0400

    OS X: Improve default CMAKE_OSX_SYSROOT selection
    
    Simplify the search for OSX_DEVELOPER_ROOT and allow it to fail if no
    "/Developer" exists.  When it does exist, always find a MacOSX SDK
    inside it to use as the default CMAKE_OSX_SYSROOT.  Otherwise set
    CMAKE_OSX_SYSROOT to empty.

diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 2a5f3cf..b160854 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -59,28 +59,18 @@ if(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
   mark_as_advanced(CMAKE_INSTALL_NAME_TOOL)
 endif()
 
-# Set the assumed (Pre 10.5 or Default) location of the developer tools
-set(OSX_DEVELOPER_ROOT "/Developer")
-
-# Use the xcode-select tool if it's available (Xcode >= 3.0 installations)
-find_program(CMAKE_XCODE_SELECT xcode-select)
-mark_as_advanced(CMAKE_XCODE_SELECT)
-if(CMAKE_XCODE_SELECT)
-  execute_process(COMMAND ${CMAKE_XCODE_SELECT} "-print-path"
-    OUTPUT_VARIABLE OSX_DEVELOPER_ROOT
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif()
-
-# Find installed SDKs
-# Start with Xcode-4.3+ default SDKs directory
-set(_CMAKE_OSX_SDKS_DIR
-  "${OSX_DEVELOPER_ROOT}/Platforms/MacOSX.platform/Developer/SDKs")
-file(GLOB _CMAKE_OSX_SDKS "${_CMAKE_OSX_SDKS_DIR}/*")
-
-# If not present, try pre-4.3 SDKs directory
-if(NOT _CMAKE_OSX_SDKS)
-set(_CMAKE_OSX_SDKS_DIR "${OSX_DEVELOPER_ROOT}/SDKs")
-  file(GLOB _CMAKE_OSX_SDKS "${_CMAKE_OSX_SDKS_DIR}/*")
+# Ask xcode-select where to find /Developer or fall back to ancient location.
+execute_process(COMMAND xcode-select -print-path
+  OUTPUT_VARIABLE _stdout
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+  ERROR_VARIABLE _stderr
+  RESULT_VARIABLE _failed)
+if(NOT _failed AND IS_DIRECTORY ${_stdout})
+  set(OSX_DEVELOPER_ROOT ${_stdout})
+elseif(IS_DIRECTORY "/Developer")
+  set(OSX_DEVELOPER_ROOT "/Developer")
+else()
+  set(OSX_DEVELOPER_ROOT "")
 endif()
 
 execute_process(COMMAND sw_vers -productVersion
@@ -107,32 +97,37 @@ endif()
 
 # Environment variable set by the user overrides our default.
 # Use the same environment variable that Xcode uses.
-set(ENV_SDKROOT "$ENV{SDKROOT}")
-
-# Set CMAKE_OSX_SYSROOT_DEFAULT based on _CURRENT_OSX_VERSION,
-# accounting for the known specially named SDKs.
-set(CMAKE_OSX_SYSROOT_DEFAULT
-  "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CURRENT_OSX_VERSION}.sdk")
-
-if(_CURRENT_OSX_VERSION STREQUAL "10.4")
-  set(CMAKE_OSX_SYSROOT_DEFAULT
-    "${_CMAKE_OSX_SDKS_DIR}/MacOSX10.4u.sdk")
-endif()
-
-if(_CURRENT_OSX_VERSION STREQUAL "10.3")
-  set(CMAKE_OSX_SYSROOT_DEFAULT
-    "${_CMAKE_OSX_SDKS_DIR}/MacOSX10.3.9.sdk")
-endif()
-
-# Use environment or default as initial cache value:
-if(NOT ENV_SDKROOT STREQUAL "")
-  set(CMAKE_OSX_SYSROOT_VALUE ${ENV_SDKROOT})
+if(NOT "x$ENV{SDKROOT}" STREQUAL "x" AND EXISTS "$ENV{SDKROOT}")
+  set(_CMAKE_OSX_SYSROOT_DEFAULT "$ENV{SDKROOT}")
 else()
-  set(CMAKE_OSX_SYSROOT_VALUE ${CMAKE_OSX_SYSROOT_DEFAULT})
+  # Find installed SDKs in either Xcode-4.3+ or pre-4.3 SDKs directory.
+  set(_CMAKE_OSX_SDKS_DIR "")
+  if(OSX_DEVELOPER_ROOT)
+    foreach(d Platforms/MacOSX.platform/Developer/SDKs SDKs)
+      file(GLOB _CMAKE_OSX_SDKS ${OSX_DEVELOPER_ROOT}/${d}/*)
+      if(_CMAKE_OSX_SDKS)
+        set(_CMAKE_OSX_SDKS_DIR ${OSX_DEVELOPER_ROOT}/${d})
+        break()
+      endif()
+    endforeach()
+  endif()
+
+  if(_CMAKE_OSX_SDKS_DIR)
+    # Select SDK for current OSX version accounting for the known
+    # specially named SDKs.
+    set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.4 "u")
+    set(_CMAKE_OSX_SDKS_VER_SUFFIX_10.3 ".9")
+    set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
+    set(_CMAKE_OSX_SYSROOT_DEFAULT
+      "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
+  else()
+    # Assume developer files are in root (such as Xcode 4.5 command-line tools).
+    set(_CMAKE_OSX_SYSROOT_DEFAULT "")
+  endif()
 endif()
 
 # Set cache variable - end user may change this during ccmake or cmake-gui configure.
-set(CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT_VALUE} CACHE PATH
+set(CMAKE_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_DEFAULT}" CACHE PATH
   "The product will be built against the headers and libraries located inside the indicated SDK.")
 
 #----------------------------------------------------------------------------

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0a0877a1eb111d37ac4766a368206e73458489e
commit a0a0877a1eb111d37ac4766a368206e73458489e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 21 08:53:42 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 21 08:53:42 2012 -0400

    OS X: Always generate -isysroot if any SDK is in use
    
    Drop the last use of CMAKE_OSX_SYSROOT_DEFAULT.  Replace internal
    platform variable CMAKE_${lang}_HAS_ISYSROOT with a more general
    CMAKE_${lang}_SYSROOT_FLAG variable.  If the -isysroot flag exists and
    CMAKE_OSX_SYSROOT points to an SDK (not "/") then always add it to
    compiler command lines.  This is already done in the Xcode IDE.

diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index 17d63eb..d74dcdc 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -45,7 +45,7 @@ if(CMAKE_C_LIBRARY_ARCHITECTURE)
   set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_C_LIBRARY_ARCHITECTURE@")
 endif()
 
-set(CMAKE_C_HAS_ISYSROOT "@CMAKE_C_HAS_ISYSROOT@")
+ at CMAKE_C_SYSROOT_FLAG_CODE@
 @CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG_CODE@
 
 set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index 7f66be5..8c5d84e 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -46,7 +46,7 @@ if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
   set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@")
 endif()
 
-set(CMAKE_CXX_HAS_ISYSROOT "@CMAKE_CXX_HAS_ISYSROOT@")
+ at CMAKE_CXX_SYSROOT_FLAG_CODE@
 @CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG_CODE@
 
 set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
diff --git a/Modules/CMakeFindPackageMode.cmake b/Modules/CMakeFindPackageMode.cmake
index c9f58e3..cea0187 100644
--- a/Modules/CMakeFindPackageMode.cmake
+++ b/Modules/CMakeFindPackageMode.cmake
@@ -53,8 +53,8 @@ include(CMakeDetermineSystem)
 
 # short-cut some tests on Darwin, see Darwin-GNU.cmake:
 if("${CMAKE_SYSTEM_NAME}" MATCHES Darwin  AND  "${COMPILER_ID}" MATCHES GNU)
-  set(${CMAKE_${LANGUAGE}_HAS_ISYSROOT} 0 )
-  set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "")
+  set(CMAKE_${LANGUAGE}_SYSROOT_FLAG "")
+  set(CMAKE_${LANGUAGE}_OSX_DEPLOYMENT_TARGET_FLAG "")
 endif()
 
 # Also load the system specific file, which sets up e.g. the search paths.
diff --git a/Modules/Platform/Darwin-Clang.cmake b/Modules/Platform/Darwin-Clang.cmake
index 46f06f7..de7a856 100644
--- a/Modules/Platform/Darwin-Clang.cmake
+++ b/Modules/Platform/Darwin-Clang.cmake
@@ -21,6 +21,6 @@ set(__DARWIN_COMPILER_CLANG 1)
 macro(__darwin_compiler_clang lang)
   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
   set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
+  set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
   set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
-  set(CMAKE_${lang}_HAS_ISYSROOT 1)
 endmacro()
diff --git a/Modules/Platform/Darwin-GNU-C.cmake b/Modules/Platform/Darwin-GNU-C.cmake
index 4e326c4..efdfd00 100644
--- a/Modules/Platform/Darwin-GNU-C.cmake
+++ b/Modules/Platform/Darwin-GNU-C.cmake
@@ -1,4 +1,4 @@
 include(Platform/Darwin-GNU)
 __darwin_compiler_gnu(C)
-cmake_gnu_has_isysroot(C)
+cmake_gnu_set_sysroot_flag(C)
 cmake_gnu_set_osx_deployment_target_flag(C)
diff --git a/Modules/Platform/Darwin-GNU-CXX.cmake b/Modules/Platform/Darwin-GNU-CXX.cmake
index b39487e..e3c2ea7 100644
--- a/Modules/Platform/Darwin-GNU-CXX.cmake
+++ b/Modules/Platform/Darwin-GNU-CXX.cmake
@@ -1,4 +1,4 @@
 include(Platform/Darwin-GNU)
 __darwin_compiler_gnu(CXX)
-cmake_gnu_has_isysroot(CXX)
+cmake_gnu_set_sysroot_flag(CXX)
 cmake_gnu_set_osx_deployment_target_flag(CXX)
diff --git a/Modules/Platform/Darwin-GNU.cmake b/Modules/Platform/Darwin-GNU.cmake
index 5e9f8f0..d953503 100644
--- a/Modules/Platform/Darwin-GNU.cmake
+++ b/Modules/Platform/Darwin-GNU.cmake
@@ -24,8 +24,8 @@ macro(__darwin_compiler_gnu lang)
   set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
 endmacro()
 
-macro(cmake_gnu_has_isysroot lang)
-  if("x${CMAKE_${lang}_HAS_ISYSROOT}" STREQUAL "x")
+macro(cmake_gnu_set_sysroot_flag lang)
+  if(NOT DEFINED CMAKE_${lang}_SYSROOT_FLAG)
     set(_doc "${lang} compiler has -isysroot")
     message(STATUS "Checking whether ${_doc}")
     execute_process(
@@ -35,11 +35,12 @@ macro(cmake_gnu_has_isysroot lang)
       )
     if("${_gcc_help}" MATCHES "isysroot")
       message(STATUS "Checking whether ${_doc} - yes")
-      set(CMAKE_${lang}_HAS_ISYSROOT 1)
+      set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
     else()
       message(STATUS "Checking whether ${_doc} - no")
-      set(CMAKE_${lang}_HAS_ISYSROOT 0)
+      set(CMAKE_${lang}_SYSROOT_FLAG "")
     endif()
+    set(CMAKE_${lang}_SYSROOT_FLAG_CODE "set(CMAKE_${lang}_SYSROOT_FLAG \"${CMAKE_${lang}_SYSROOT_FLAG}\")")
   endif()
 endmacro()
 
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index cf2af0a..f2bced4 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1792,46 +1792,34 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
     {
     std::vector<std::string> archs;
     target->GetAppleArchs(config, archs);
-    const char* sysroot =
-      this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT");
-    const char* sysrootDefault =
-      this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
+    const char* sysroot = this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT");
+    if(sysroot && sysroot[0] == '/' && !sysroot[1])
+      { sysroot = 0; }
+    std::string sysrootFlagVar =
+      std::string("CMAKE_") + lang + "_SYSROOT_FLAG";
+    const char* sysrootFlag =
+      this->Makefile->GetDefinition(sysrootFlagVar.c_str());
     const char* deploymentTarget =
       this->Makefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
-    std::string isysrootVar = std::string("CMAKE_") + lang + "_HAS_ISYSROOT";
-    bool hasIsysroot = this->Makefile->IsOn(isysrootVar.c_str());
     std::string deploymentTargetFlagVar =
       std::string("CMAKE_") + lang + "_OSX_DEPLOYMENT_TARGET_FLAG";
     const char* deploymentTargetFlag =
       this->Makefile->GetDefinition(deploymentTargetFlagVar.c_str());
-    bool flagsUsed = false;
-    if(!archs.empty() && sysroot && lang && (lang[0] =='C' || lang[0] == 'F'))
-      {
-      // if there is more than one arch add the -arch and
-      // -isysroot flags, or if there is one arch flag, but
-      // it is not the default -arch flag for the system, then
-      // add it.  Otherwize do not add -arch and -isysroot
-      if(archs[0] != "")
+    if(!archs.empty() && lang && (lang[0] =='C' || lang[0] == 'F'))
+      {
+      for(std::vector<std::string>::iterator i = archs.begin();
+          i != archs.end(); ++i)
         {
-        for( std::vector<std::string>::iterator i = archs.begin();
-             i != archs.end(); ++i)
-          {
-          flags += " -arch ";
-          flags += *i;
-          }
-        if(hasIsysroot)
-          {
-          flags += " -isysroot ";
-          flags += sysroot;
-          }
-        flagsUsed = true;
+        flags += " -arch ";
+        flags += *i;
         }
       }
 
-    if(!flagsUsed && sysroot && sysrootDefault &&
-       strcmp(sysroot, sysrootDefault) != 0 && hasIsysroot)
+    if(sysrootFlag && *sysrootFlag && sysroot && *sysroot)
       {
-      flags += " -isysroot ";
+      flags += " ";
+      flags += sysrootFlag;
+      flags += " ";
       flags += sysroot;
       }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33a60e6bd148479c63734286417f582444bf36b6
commit 33a60e6bd148479c63734286417f582444bf36b6
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 21 08:47:02 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 21 08:47:02 2012 -0400

    Xcode: Remove unused code reading CMAKE_OSX_SYSROOT_DEFAULT
    
    The condition for entering the block where the value is used
    can never be true anymore.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index e8ab38f..5fdfcf8 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3118,18 +3118,14 @@ void cmGlobalXCodeGenerator
 
   const char* sysroot =
       this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT");
-  const char* sysrootDefault =
-    this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
   const char* deploymentTarget =
     this->CurrentMakefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
   if(osxArch && sysroot)
     {
-    bool flagsUsed = false;
     // recompute this as it may have been changed since enable language
     this->Architectures.clear();
     cmSystemTools::ExpandListArgument(std::string(osxArch),
                                       this->Architectures);
-    flagsUsed = true;
     buildSettings->AddAttribute("SDKROOT",
                                 this->CreateString(sysroot));
     std::string archString;
@@ -3144,12 +3140,6 @@ void cmGlobalXCodeGenerator
       }
     buildSettings->AddAttribute("ARCHS",
                                 this->CreateString(archString.c_str()));
-    if(!flagsUsed && sysrootDefault &&
-       strcmp(sysroot, sysrootDefault) != 0)
-      {
-      buildSettings->AddAttribute("SDKROOT",
-                                  this->CreateString(sysroot));
-      }
     }
   if(deploymentTarget && *deploymentTarget)
     {

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeCCompiler.cmake.in       |    2 +-
 Modules/CMakeCXXCompiler.cmake.in     |    2 +-
 Modules/CMakeFindPackageMode.cmake    |    4 +-
 Modules/Platform/Darwin-Clang.cmake   |    2 +-
 Modules/Platform/Darwin-GNU-C.cmake   |    2 +-
 Modules/Platform/Darwin-GNU-CXX.cmake |    2 +-
 Modules/Platform/Darwin-GNU.cmake     |    9 ++--
 Modules/Platform/Darwin.cmake         |   83 +++++++++++++++-----------------
 Source/CMakeVersion.cmake             |    2 +-
 Source/cmGlobalXCodeGenerator.cxx     |   10 ----
 Source/cmLocalGenerator.cxx           |   46 +++++++-----------
 Tests/Assembler/CMakeLists.txt        |    3 +
 bootstrap                             |    8 +++
 13 files changed, 80 insertions(+), 95 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list