Merge pull request #200 from bkryza/fix-gcc13-build

Ignore Wdangling-reference warnings on GCC 13
This commit is contained in:
Bartek Kryza
2023-10-25 14:03:12 +02:00
committed by GitHub
2 changed files with 11 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ output_directory: docs/diagrams
comment_parser: clang
remove_compile_flags:
- -Wno-class-memaccess
- -Wno-dangling-reference
generate_links:
link: "{% if existsIn(element, \"doxygen_link\") %}{{ element.doxygen_link }}{% endif %}"
tooltip: "{% if existsIn(element, \"comment\") and existsIn(element.comment, \"brief\") %}{{ abbrv(trim(replace(element.comment.brief.0, \"\\n+\", \" \")), 256) }}{% else %}{{ element.name }}{% endif %}"

View File

@@ -136,14 +136,21 @@ endif()
# Setup custom compile options depending on various compiler
# and environment quirks
#
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "13.0")
# Workaround over Wdangling-reference false positives in libfmt
set(CUSTOM_COMPILE_OPTIONS ${CUSTOM_COMPILE_OPTIONS} -Wno-dangling-reference)
endif()
endif()
if(LLVM_VERSION_MAJOR GREATER_EQUAL 17)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CUSTOM_COMPILE_OPTIONS "-Wno-class-memaccess")
set(CUSTOM_COMPILE_OPTIONS ${CUSTOM_COMPILE_OPTIONS} -Wno-class-memaccess)
endif()
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CUSTOM_COMPILE_OPTIONS
"${CUSTOM_COMPILE_OPTIONS} -Wno-unused-private-field")
${CUSTOM_COMPILE_OPTIONS} -Wno-unused-private-field)
endif()
#
@@ -219,4 +226,4 @@ option(BUILD_TESTS "" ON)
if(BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif(BUILD_TESTS)
endif(BUILD_TESTS)