[Cmake-commits] CMake branch, next, updated. v3.1.0-1846-gbf3deea

Brad King brad.king at kitware.com
Tue Jan 13 14:52:34 EST 2015


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  bf3deea7a7a709877500743304f7185789234877 (commit)
       via  dc17dd894a3f21ffbd9bcb85a86aa42ee7879ebf (commit)
      from  3352c05b873c03505d877acf7dbc922319e1f6a2 (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=bf3deea7a7a709877500743304f7185789234877
commit bf3deea7a7a709877500743304f7185789234877
Merge: 3352c05 dc17dd8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 13 14:52:33 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 13 14:52:33 2015 -0500

    Merge topic 'Apple-compiler-selection' into next
    
    dc17dd89 Apple: Resolve compiler in /usr/bin to that reported by Xcode


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc17dd894a3f21ffbd9bcb85a86aa42ee7879ebf
commit dc17dd894a3f21ffbd9bcb85a86aa42ee7879ebf
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 3 17:36:34 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 12 20:13:31 2015 +0100

    Apple: Resolve compiler in /usr/bin to that reported by Xcode
    
    The compiler in the PATH on mac is a stub for a different delegate
    depending on the environment.  Rather than requiring xcode-select to
    change the used Xcode globally, users should be able to choose the
    compiler per-session.  That is possible with the DEVELOPER_DIR
    environment variable.
    
    However, the environment can change between running CMake and invoking
    the build.  In such cases, CMake prefers to record the relevant paths
    from the environment and use them when invoking the build.  That is not
    currently done for the compilers on APPLE, so the compiler used is not
    the one reported when running cmake:
    
     $ DEVELOPER_DIR=/Applications/Xcode2.app/Contents/Developer/ cc --version
     Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
     Target: x86_64-apple-darwin13.4.0
     Thread model: posix
    
     $ DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/ cc --version
     Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
     Target: x86_64-apple-darwin13.4.0
     Thread model: posix
    
    Update that now by querying Xcode for the correct compiler path if
    the compiler located by ordinary means is located in /usr/bin.  It is
    expected that compilers installed manually or through a package manager
    will not be found there but will be in /usr/local instead.

diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake
index 0ab3af6..7b21dcf 100644
--- a/Modules/CMakeDetermineCompiler.cmake
+++ b/Modules/CMakeDetermineCompiler.cmake
@@ -71,7 +71,9 @@ macro(_cmake_find_compiler lang)
   unset(_languages)
 
   # Look for a make tool provided by Xcode
-  if(CMAKE_${lang}_COMPILER STREQUAL "CMAKE_${lang}_COMPILER-NOTFOUND" AND CMAKE_HOST_APPLE)
+  if(CMAKE_HOST_APPLE
+      AND (CMAKE_${lang}_COMPILER STREQUAL "CMAKE_${lang}_COMPILER-NOTFOUND"
+        OR CMAKE_${lang}_COMPILER MATCHES "^/usr/bin"))
     foreach(comp ${CMAKE_${lang}_COMPILER_LIST})
       execute_process(COMMAND xcrun --find ${comp}
         OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list