Ignore Wdangling-reference warnings on GCC 13
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user