Skip to content

Commit

Permalink
Reenable optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ottoblep committed Mar 11, 2025
1 parent 2823f86 commit effc3e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmake/CompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function(enable_project_options target_name)
# enable coverage collection options
option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" FALSE)
if(ENABLE_COVERAGE)
target_compile_options(${target_name} INTERFACE --coverage -fprofile-arcs -ftest-coverage -O0)
target_compile_options(${target_name} INTERFACE --coverage -fprofile-arcs -ftest-coverage)
target_link_libraries(${target_name} INTERFACE gcov --coverage)
endif()

Expand All @@ -36,12 +36,12 @@ function(enable_project_options target_name)
endif()

# enable some more optimizations in release mode
target_compile_options(${target_name} INTERFACE $<$<CONFIG:RELEASE>:-fno-math-errno -ffinite-math-only
target_compile_options(${target_name} INTERFACE $<$<CONFIG:RELEASE>:-O3 -fno-math-errno -ffinite-math-only
-fno-trapping-math>)

# enable some more options for better debugging
target_compile_options(
${target_name} INTERFACE $<$<CONFIG:DEBUG>:-O0 -Wno-cpp -Wno-unused-result -fno-omit-frame-pointer
${target_name} INTERFACE $<$<CONFIG:DEBUG>:-Wno-cpp -Wno-unused-result -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-inline-functions>)
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/StandardProjectSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function(enable_project_options target_name)
# enable coverage collection options
option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" FALSE)
if(ENABLE_COVERAGE)
target_compile_options(${target_name} INTERFACE --coverage -fprofile-arcs -ftest-coverage -O0)
target_compile_options(${target_name} INTERFACE --coverage -fprofile-arcs -ftest-coverage)
target_link_libraries(${target_name} INTERFACE gcov --coverage)
endif()

Expand Down
1 change: 1 addition & 0 deletions dev_scripts/build_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake --build build --config Release

0 comments on commit effc3e7

Please sign in to comment.