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:
Maarten Bent
2019-07-19 01:51:47 +02:00
parent 46f01bfe8b
commit 7f5ca2a4cb
2 changed files with 3 additions and 3 deletions

View File

@@ -176,7 +176,7 @@ if(wxBUILD_PRECOMP)
# standard c++ headers when using clang.
# Do not disable precompiled headers entirely but use the main Scintilla
# header as prefix header so there is at least a small speedup.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(wxSCINTILLA_PREC_HEADER "${wxSOURCE_DIR}/src/stc/scintilla/include/Scintilla.h")
endif()
wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER})