[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3682-ge80d176

Brad King brad.king at kitware.com
Mon Aug 5 14:59:52 EDT 2013


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  e80d176112fc4a69fe036f0f02dc29ce464386c9 (commit)
       via  c3af6becdae8b15fcb3b834099fa7320b1035e24 (commit)
      from  299d7e408ed7435e5265ef8acde75fa133901f23 (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=e80d176112fc4a69fe036f0f02dc29ce464386c9
commit e80d176112fc4a69fe036f0f02dc29ce464386c9
Merge: 299d7e4 c3af6be
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Aug 5 14:59:50 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Aug 5 14:59:50 2013 -0400

    Merge topic 'osx-no-command-line-tools' into next
    
    c3af6be OS X: Enable command-line build without tools in PATH


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3af6becdae8b15fcb3b834099fa7320b1035e24
commit c3af6becdae8b15fcb3b834099fa7320b1035e24
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Aug 5 13:48:09 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Aug 5 13:48:09 2013 -0400

    OS X: Enable command-line build without tools in PATH
    
    Teach modules CMakeDetermineCompiler and CMakeUnixFindMake to ask Xcode
    where to find the compiler or make tools, using 'xcrun --find', if none
    is found in the PATH.  Teach module Platform/Darwin to add the path to
    the SDK to CMAKE_SYSTEM_PREFIX_PATH so that find_* command look there.
    Also add the SDK /usr/include directory to the implicit include list in
    CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES to suppress explicit -I
    options for it.

diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake
index 2d12c07..1763c96 100644
--- a/Modules/CMakeDetermineCompiler.cmake
+++ b/Modules/CMakeDetermineCompiler.cmake
@@ -69,4 +69,17 @@ macro(_cmake_find_compiler lang)
   endif()
   unset(_${lang}_COMPILER_HINTS)
   unset(_languages)
+
+  # Look for a make tool provided by Xcode
+  if(NOT CMAKE_${lang}_COMPILER AND CMAKE_HOST_APPLE)
+    foreach(comp ${CMAKE_${lang}_COMPILER_LIST})
+      execute_process(COMMAND xcrun --find ${comp}
+        OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE
+        ERROR_VARIABLE _xcrun_err)
+      if(_xcrun_out)
+        set_property(CACHE CMAKE_${lang}_COMPILER PROPERTY VALUE "${_xcrun_out}")
+        break()
+      endif()
+    endforeach()
+  endif()
 endmacro()
diff --git a/Modules/CMakeUnixFindMake.cmake b/Modules/CMakeUnixFindMake.cmake
index c75cf7c..3714926 100644
--- a/Modules/CMakeUnixFindMake.cmake
+++ b/Modules/CMakeUnixFindMake.cmake
@@ -14,3 +14,13 @@
 
 find_program(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
 mark_as_advanced(CMAKE_MAKE_PROGRAM)
+
+# Look for a make tool provided by Xcode
+if(NOT CMAKE_MAKE_PROGRAM AND CMAKE_HOST_APPLE)
+  execute_process(COMMAND xcrun --find make
+    OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE
+    ERROR_VARIABLE _xcrun_err)
+  if(_xcrun_out)
+    set_property(CACHE CMAKE_MAKE_PROGRAM PROPERTY VALUE "${_xcrun_out}")
+  endif()
+endif()
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 865cc8e..db8c7ef 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -326,6 +326,12 @@ set(CMAKE_SYSTEM_APPBUNDLE_PATH
 unset(_apps_paths)
 
 include(Platform/UnixPaths)
+if(_CMAKE_OSX_SYSROOT_PATH AND EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
+  list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${_CMAKE_OSX_SYSROOT_PATH}/usr)
+  foreach(lang C CXX)
+    list(APPEND CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
+  endforeach()
+endif()
 list(APPEND CMAKE_SYSTEM_PREFIX_PATH
   /sw        # Fink
   /opt/local # MacPorts

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

Summary of changes:
 Modules/CMakeDetermineCompiler.cmake |   13 +++++++++++++
 Modules/CMakeUnixFindMake.cmake      |   10 ++++++++++
 Modules/Platform/Darwin.cmake        |    6 ++++++
 3 files changed, 29 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list