From 92c5a50cf7b5d35899cc73ae87a6f80cc1d6db4e Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Mon, 10 Jun 2024 11:01:05 -0400 Subject: [PATCH] Fix optimization build settings (#504) Default build settings were inadvertantly changed so that optimization was always disabled. This PR fixes that mistake and updates debug build configuration to guarantee that optimization is disabled. Signed-off-by: Will Hawkins Co-authored-by: Alan Jowett --- cmake/settings.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/settings.cmake b/cmake/settings.cmake index 1789e573a..720eef45d 100644 --- a/cmake/settings.cmake +++ b/cmake/settings.cmake @@ -17,8 +17,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) -Wall -Werror -Iinc - -O0 - -g + -O2 -Wunused-parameter -fPIC ) @@ -27,6 +26,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") target_compile_options("ubpf_settings" INTERFACE + -O0 -g ) endif()