Skip to content
Permalink
Browse files

Add an extremely horrible hack to allow the python bindings to build

on gcc11

Don't blame me, blame sip
  • Loading branch information
nyalldawson committed Mar 26, 2021
1 parent bc1f5d2 commit bb76b6bf3781952cef18d25290ee0f25f616fc73
Showing with 6 additions and 0 deletions.
  1. +6 −0 python/CMakeLists.txt
@@ -162,6 +162,12 @@ GENERATE_SIP_PYTHON_MODULE_CODE(qgis._core core/core.sip "${sip_files_core}" cpp
BUILD_SIP_PYTHON_MODULE(qgis._core core/core.sip ${cpp_files} "" qgis_core)
set(SIP_CORE_CPP_FILES ${cpp_files})

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Bad hack to fix compilation with gcc 11 - for some reason it's ignoring
# the c++ standard version set for the target in BUILD_SIP_PYTHON_MODULE!
add_definitions(-std=c++14)
endif()

if(UNIX AND NOT SIP_VERSION_NUM LESS 265984)
set(SIP_EXTRA_OPTIONS -P ${SIP_EXTRA_OPTIONS})
add_definitions(-Dprotected=public)

0 comments on commit bb76b6b

Please sign in to comment.