Skip to content

Commit eb540a2

Browse files
committed
cmake: Remove core_sanitizer_{cxx,linker}_flags helper variables
This change make the code more concise and minimizes the diff in the subsequent commit.
1 parent 3867d24 commit eb540a2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ set(SECP256K1_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
5151
include(GetTargetInterface)
5252
# -fsanitize and related flags apply to both C++ and C,
5353
# so we can pass them down to libsecp256k1 as CFLAGS and LDFLAGS.
54-
get_target_interface(core_sanitizer_cxx_flags "" sanitize_interface COMPILE_OPTIONS)
55-
set(SECP256K1_APPEND_CFLAGS ${core_sanitizer_cxx_flags} CACHE STRING "" FORCE)
56-
unset(core_sanitizer_cxx_flags)
57-
get_target_interface(core_sanitizer_linker_flags "" sanitize_interface LINK_OPTIONS)
58-
set(SECP256K1_APPEND_LDFLAGS ${core_sanitizer_linker_flags} CACHE STRING "" FORCE)
59-
unset(core_sanitizer_linker_flags)
54+
get_target_interface(SECP256K1_APPEND_CFLAGS "" sanitize_interface COMPILE_OPTIONS)
55+
set(SECP256K1_APPEND_CFLAGS ${SECP256K1_APPEND_CFLAGS} CACHE STRING "" FORCE)
56+
get_target_interface(SECP256K1_APPEND_LDFLAGS "" sanitize_interface LINK_OPTIONS)
57+
set(SECP256K1_APPEND_LDFLAGS ${SECP256K1_APPEND_LDFLAGS} CACHE STRING "" FORCE)
6058
# We want to build libsecp256k1 with the most tested RelWithDebInfo configuration.
6159
enable_language(C)
6260
foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES)

0 commit comments

Comments
 (0)