Skip to content

Commit

Permalink
Fix compilation on gcc 14+
Browse files Browse the repository at this point in the history
  • Loading branch information
XapaJIaMnu authored May 12, 2024
1 parent 2be8344 commit 2781d73
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ else(MSVC)
list(APPEND ALL_WARNINGS -Wsuggest-override -Wno-int-in-bool-context)
endif()

# This warning does not exist prior to gcc 14.0
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14.0)
list(APPEND ALL_WARNINGS -Wno-template-id-cdtor;)
endif()

if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# these flags are not known to clang
set(CMAKE_GCC_FLAGS "-Wl,--no-as-needed")
Expand Down

0 comments on commit 2781d73

Please sign in to comment.