CMake: Fix wxscintilla with precompiled headers and clang

The problem also occurs on Linux.
This commit is contained in:
Maarten Bent
2018-12-01 13:44:32 +01:00
parent 5282f92f8f
commit 29666f1d91

View File

@@ -167,10 +167,10 @@ target_compile_definitions(wxscintilla PUBLIC
if(wxBUILD_PRECOMP)
# The auto-generated header causes undefined members and identifiers in the
# standard c++ headers when using clang on macOS or Windows.
# 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" AND (APPLE OR WIN32))
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(wxSCINTILLA_PREC_HEADER "${wxSOURCE_DIR}/src/stc/scintilla/include/Scintilla.h")
endif()
wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER})