Skip to content

Commit

Permalink
-fopt-info
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst authored Dec 21, 2024
1 parent 74ee890 commit b2db28a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,11 @@ if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_C
else () # not intel
# gcc and clang support bad function cast and alignment warnings; add them as well.
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wbad-function-cast -Wcast-align" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopt-info -Wcast-align" )

set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-align" )

if ( CMAKE_COMPILER_IS_GNUCXX )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopt-info" )
endif()
if ( enable-ubsan )
set ( CMAKE_C_FLAGS "-fsanitize=address,undefined ${CMAKE_C_FLAGS}" )
set ( CMAKE_CXX_FLAGS "-fsanitize=address,undefined ${CMAKE_CXX_FLAGS}" )
Expand Down

0 comments on commit b2db28a

Please sign in to comment.