Skip to content

Commit

Permalink
Add -Wnrvo flag for GCC 14.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Nov 25, 2023
1 parent 8fb06cc commit d4b6f0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/CompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,8 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
# Extra warning flags for GCC 7.0+
target_compile_options( ${LIB_TARGET} PRIVATE -Wduplicated-branches -Wrestrict )
endif()
if ( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0 )
# Extra warning flags for GCC 14.0+
target_compile_definitions( ${LIB_TARGET} PRIVATE -Wnrvo )
endif()
endif()

0 comments on commit d4b6f0c

Please sign in to comment.