Skip to content

Commit d448f6f

Browse files
committed
fixup! cmake: Add fuzzing options
This preprocessor definition was overlooked.
1 parent 91ad4e2 commit d448f6f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ option(BUILD_BENCH "Build bench_bitcoin executable." ON)
7575
cmake_dependent_option(BUILD_FUZZ_BINARY "Build fuzz binary." ON "NOT MSVC" OFF)
7676
cmake_dependent_option(FUZZ "Build for fuzzing. Enabling this will disable all other targets and override BUILD_FUZZ_BINARY." OFF "NOT MSVC" OFF)
7777

78+
# The core_interface library aims to encapsulate common build flags.
79+
# It is intended to be a usage requirement for all other targets.
80+
add_library(core_interface INTERFACE)
81+
7882
if(FUZZ)
7983
message(WARNING "FUZZ=ON will disable all other targets and force BUILD_FUZZ_BINARY=ON.")
8084
set(BUILD_DAEMON OFF)
@@ -91,6 +95,10 @@ if(FUZZ)
9195
set(BUILD_TESTS OFF)
9296
set(BUILD_BENCH OFF)
9397
set(BUILD_FUZZ_BINARY ON)
98+
99+
target_compile_definitions(core_interface INTERFACE
100+
ABORT_ON_FAILED_ASSUME
101+
)
94102
endif()
95103

96104
option(INSTALL_MAN "Install man pages." ON)
@@ -108,10 +116,6 @@ elseif(NOT WIN32)
108116
endif()
109117
unset(check_pie_output)
110118

111-
# The core_interface library aims to encapsulate common build flags.
112-
# It is intended to be a usage requirement for all other targets.
113-
add_library(core_interface INTERFACE)
114-
115119
include(TryAppendCXXFlags)
116120
include(TryAppendLinkerFlag)
117121

0 commit comments

Comments
 (0)