From eb540a262953baf9ed920f98efc4044a353b278a Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:52:37 +0000 Subject: [PATCH] cmake: Remove `core_sanitizer_{cxx,linker}_flags` helper variables This change make the code more concise and minimizes the diff in the subsequent commit. --- src/CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 889c00c78327f..9629dd70336bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -51,12 +51,10 @@ set(SECP256K1_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) include(GetTargetInterface) # -fsanitize and related flags apply to both C++ and C, # so we can pass them down to libsecp256k1 as CFLAGS and LDFLAGS. -get_target_interface(core_sanitizer_cxx_flags "" sanitize_interface COMPILE_OPTIONS) -set(SECP256K1_APPEND_CFLAGS ${core_sanitizer_cxx_flags} CACHE STRING "" FORCE) -unset(core_sanitizer_cxx_flags) -get_target_interface(core_sanitizer_linker_flags "" sanitize_interface LINK_OPTIONS) -set(SECP256K1_APPEND_LDFLAGS ${core_sanitizer_linker_flags} CACHE STRING "" FORCE) -unset(core_sanitizer_linker_flags) +get_target_interface(SECP256K1_APPEND_CFLAGS "" sanitize_interface COMPILE_OPTIONS) +set(SECP256K1_APPEND_CFLAGS ${SECP256K1_APPEND_CFLAGS} CACHE STRING "" FORCE) +get_target_interface(SECP256K1_APPEND_LDFLAGS "" sanitize_interface LINK_OPTIONS) +set(SECP256K1_APPEND_LDFLAGS ${SECP256K1_APPEND_LDFLAGS} CACHE STRING "" FORCE) # We want to build libsecp256k1 with the most tested RelWithDebInfo configuration. enable_language(C) foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES)