Skip to content

Commit 598eda8

Browse files
committed
cmake [KILL 3-STATE]: Switch WITH_USDT to boolean w/ default OFF
1 parent f3c2fea commit 598eda8

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ if(WITH_ZMQ)
108108
endif()
109109
endif()
110110

111-
tristate_option(WITH_USDT
112-
"Enable tracepoints for Userspace, Statically Defined Tracing."
113-
"if sys/sdt.h is found."
114-
AUTO
115-
)
111+
option(WITH_USDT "Enable tracepoints for Userspace, Statically Defined Tracing." OFF)
112+
if(WITH_USDT)
113+
find_package(USDT MODULE REQUIRED)
114+
endif()
115+
116116
cmake_dependent_option(WITH_EXTERNAL_SIGNER "Enable external signer support." ON "NOT WIN32" OFF)
117117
set(ENABLE_EXTERNAL_SIGNER ${WITH_EXTERNAL_SIGNER})
118118
tristate_option(WITH_QRENCODE "Enable QR code support." "if libqrencode is found." AUTO)

cmake/optional.cmake

-11
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@ if(CCACHE)
5050
mark_as_advanced(CCACHE_COMMAND)
5151
endif()
5252

53-
if(WITH_USDT)
54-
find_package(USDT MODULE)
55-
if(USDT_FOUND)
56-
set(WITH_USDT ON)
57-
elseif(WITH_USDT STREQUAL "AUTO")
58-
set(WITH_USDT OFF)
59-
else()
60-
message(FATAL_ERROR "sys/sdt.h requested, but not found.")
61-
endif()
62-
endif()
63-
6453
if(ENABLE_WALLET)
6554
if(WITH_SQLITE)
6655
if(VCPKG_TARGET_TRIPLET)

depends/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina
291291
-e 's|@no_sqlite@|$(NO_SQLITE)|' \
292292
-e 's|@no_upnp@|$(NO_UPNP)|' \
293293
-e 's|@no_natpmp@|$(NO_NATPMP)|' \
294-
-e 's|@no_usdt@|$(NO_USDT)|' \
294+
-e 's|@usdt_packages@|$(usdt_packages_)|' \
295295
-e 's|@no_harden@|$(NO_HARDEN)|' \
296296
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
297297
$< > $@

depends/toolchain.cmake.in

+4-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ else()
158158
set(WITH_NATPMP ON CACHE BOOL "")
159159
endif()
160160

161-
if(NOT WITH_USDT AND "@no_usdt@" STREQUAL "1")
162-
set(WITH_USDT OFF CACHE STRING "Enable tracepoints for Userspace, Statically Defined Tracing.")
161+
if("@usdt_packages@" STREQUAL "")
162+
set(WITH_USDT OFF CACHE BOOL "")
163+
else()
164+
set(WITH_USDT ON CACHE BOOL "")
163165
endif()
164166

165167
if("@no_harden@")

0 commit comments

Comments
 (0)