Ensure Clang and AppleClang are recognized by CMake script

As of CMake 3.0, the CMAKE_<LANG>_COMPILER_ID variable can take on two
different values for Clang: "Clang" and "AppleClang", the latter
referring to the Clang distributed by Apple with Xcode.

Therefore, update the compiler check to match CMAKE_<LANG>_COMPILER_ID
against the regular expression ".*Clang".
This commit is contained in:
Sean LK 2014-08-29 18:31:59 +00:00
parent 3eb2ea5e08
commit c02fe626f8

View File

@ -77,7 +77,7 @@ endif()
# description
# 1) http://kjellkod.wordpress.com/2013/09/23/experimental-g2log-with-clang/
# 2) https://github.com/maidsafe/MaidSafe/wiki/Hacking-with-Clang-llvm-abi-and-llvm-libc
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
MESSAGE("")
MESSAGE("cmake for Clang ")
if (APPLE)