mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +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()
|
endif()
|
||||||
set(LYX_GCC11_MODE)
|
set(LYX_GCC11_MODE)
|
||||||
if(UNIX OR MINGW)
|
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
|
# ignore the GCC_VERSION for clang
|
||||||
# and use the resulting CXX11_STD_REGEX found in FindCXX11Compiler.cmake
|
# and use the resulting CXX11_STD_REGEX found in FindCXX11Compiler.cmake
|
||||||
message(STATUS "Using clang")
|
message(STATUS "Using clang")
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
INCLUDE(CheckCXXSourceCompiles)
|
INCLUDE(CheckCXXSourceCompiles)
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
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")
|
set(CXX11_FLAG_CANDIDATES "--std=c++11 -Wno-deprecated-register")
|
||||||
else()
|
else()
|
||||||
if (CYGWIN)
|
if (CYGWIN)
|
||||||
|
Loading…
Reference in New Issue
Block a user