From ab65862417adc80dfb18170a6bd70889a24fe045 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 2 Oct 2013 13:52:48 -0400 Subject: Clang: Add separate "AppleClang" compiler id Apple distributes their own Clang build with their own version numbers that differ from upstream Clang. Use the __apple_build_version__ symbol to identify the Apple Clang compiler and report the Apple Build Version as the fourth version component in CMAKE__COMPILER_VERSION. Add Compiler/AppleClang- and Platform/Darwin-AppleClang- modules that simply include the upstream equivalents. Fix comparisons of CMAKE__COMPILER_ID to Clang in CMake's own source and tests to account for AppleClang. --- Tests/Assembler/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Tests/Assembler') diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt index bb4bcccbe8..1f07dc9cf4 100644 --- a/Tests/Assembler/CMakeLists.txt +++ b/Tests/Assembler/CMakeLists.txt @@ -9,7 +9,7 @@ set(SRCS) # and also generate assembler files from C: if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode" AND NOT CMAKE_OSX_ARCHITECTURES) - if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|Clang|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX)) + if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|Clang|AppleClang|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};") -- cgit v1.2.1