mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Extend Clang compiler detection to cover Apple CLang
CMake 3.0 and above recognize that Apple Clang is a different compiler than upstream Clang and so it gets a different CMAKE_CXX_COMPILER_ID.
This commit is contained in:
parent
cb08d4a879
commit
1bf4d7b0fc
@ -260,7 +260,7 @@ if(NOT CXX11COMPILER_FOUND)
|
||||
endif()
|
||||
set(LYX_GCC11_MODE)
|
||||
if(UNIX OR MINGW)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "^[cC]lang$")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "^([cC]lang|AppleClang)$")
|
||||
# ignore the GCC_VERSION for clang
|
||||
# and use the resulting CXX11_STD_REGEX found in FindCXX11Compiler.cmake
|
||||
message(STATUS "Using clang")
|
||||
|
@ -34,7 +34,7 @@
|
||||
INCLUDE(CheckCXXSourceCompiles)
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "^[cC]lang$")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "^([cC]lang|AppleClang)$")
|
||||
set(CXX11_FLAG_CANDIDATES "--std=c++11 -Wno-deprecated-register")
|
||||
else()
|
||||
if (CYGWIN)
|
||||
|
Loading…
Reference in New Issue
Block a user