diff --git a/cmake/CompilerOptions.cmake b/cmake/CompilerOptions.cmake index fdac40dbe..5c1989dca 100644 --- a/cmake/CompilerOptions.cmake +++ b/cmake/CompilerOptions.cmake @@ -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() @@ -36,12 +36,12 @@ function(enable_project_options target_name) endif() # enable some more optimizations in release mode - target_compile_options(${target_name} INTERFACE $<$:-fno-math-errno -ffinite-math-only + target_compile_options(${target_name} INTERFACE $<$:-O3 -fno-math-errno -ffinite-math-only -fno-trapping-math>) # enable some more options for better debugging target_compile_options( - ${target_name} INTERFACE $<$:-O0 -Wno-cpp -Wno-unused-result -fno-omit-frame-pointer + ${target_name} INTERFACE $<$:-Wno-cpp -Wno-unused-result -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-inline-functions>) endif() diff --git a/cmake/StandardProjectSettings.cmake b/cmake/StandardProjectSettings.cmake index a4e6b4646..e20bf8cbc 100644 --- a/cmake/StandardProjectSettings.cmake +++ b/cmake/StandardProjectSettings.cmake @@ -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() diff --git a/dev_scripts/build_release.sh b/dev_scripts/build_release.sh new file mode 100755 index 000000000..3989e5418 --- /dev/null +++ b/dev_scripts/build_release.sh @@ -0,0 +1 @@ +cmake --build build --config Release