mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-26 17:52:13 +01:00
cmake: Introduce FUZZ_LIBS
CMake distinguishes recommended methods for handling (1) linker options and (2) libraries used during linking. Therefore, it is both reasonable and consistent to introduce a dedicated variable for the latter, particularly when a build environment, such as OSS-Fuzz, requires linking against additional libraries.
This commit is contained in:
parent
ea929c0848
commit
2c4b229c90
@ -386,6 +386,7 @@ endif()
|
||||
target_link_options(sanitize_interface INTERFACE ${SANITIZER_LDFLAGS})
|
||||
|
||||
if(BUILD_FUZZ_BINARY)
|
||||
target_link_libraries(core_interface INTERFACE ${FUZZ_LIBS})
|
||||
include(CheckSourceCompilesWithFlags)
|
||||
check_cxx_source_compiles_with_flags("
|
||||
#include <cstdint>
|
||||
@ -394,6 +395,7 @@ if(BUILD_FUZZ_BINARY)
|
||||
// No main() function.
|
||||
" FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION
|
||||
LDFLAGS ${SANITIZER_LDFLAGS}
|
||||
LINK_LIBRARIES ${FUZZ_LIBS}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user