Skip to content

Commit

Permalink
Enable LTO
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Aug 2, 2024
1 parent 7490bff commit b493e7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ target_include_directories(SOM++ PRIVATE ${SRC_DIR})

target_link_libraries(SOM++)

if(CMAKE_BUILD_TYPE STREQUAL "Release")
target_compile_options(SOM++ PRIVATE -O3 -flto)
target_link_options(SOM++ PRIVATE -flto)
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_executable(unittests "")

Expand Down

0 comments on commit b493e7d

Please sign in to comment.