Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 bb76b6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/CMakeLists.txt
Expand Up @@ -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)

This comment has been minimized.

Copy link
@3nids

3nids Apr 21, 2021

Member

@nyalldawson why 14 and not 17?

endif()

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

0 comments on commit bb76b6b

Please sign in to comment.