CMake: Fix detecting AppleClang
Policies are now correctly initialized (before creating the project). Policy CMP0025 changes the compilerID of Clang on Apple, handle this correctly.
This commit is contained in:
@@ -62,7 +62,7 @@ if(MSVC)
|
||||
string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
|
||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
|
||||
if(wxBUILD_OPTIMISE)
|
||||
set(GCC_PREFERRED_RELEASE_FLAGS " -O2 -fomit-frame-pointer")
|
||||
wx_string_append(CMAKE_CXX_FLAGS_RELEASE "${GCC_PREFERRED_RELEASE_FLAGS}")
|
||||
@@ -100,7 +100,7 @@ endif()
|
||||
if(wxUSE_NO_RTTI)
|
||||
if(MSVC)
|
||||
add_compile_options("/GR-")
|
||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
|
||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
|
||||
wx_string_append(CMAKE_CXX_FLAGS " -fno-rtti")
|
||||
endif()
|
||||
add_definitions("-DwxNO_RTTI")
|
||||
|
Reference in New Issue
Block a user