Skip to content

Commit

Permalink
Disable dangling-reference warning (#116)
Browse files Browse the repository at this point in the history
* Disable dangling-reference warning

Too many false positives

* Use CXX specifc flags
  • Loading branch information
tmadlener authored Oct 2, 2024
1 parent 5e8879e commit 8e29e3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if(NOT CMAKE_CXX_STANDARD MATCHES "17|20")
message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always -Wno-dangling-reference")
endif()

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})


Expand Down

0 comments on commit 8e29e3d

Please sign in to comment.