Skip to content

Commit f3f5c97

Browse files
committed
Merge bitcoin/bitcoin#27496: depends: reuse _config_opts for CMake options
63c0c4f depends: reuse _config_opts for CMake options (Cory Fields) Pull request description: Context: I'm [currently experimenting with building our depends with CMake when possible](https://github.com/theuni/bitcoin/commits/depends-cmake) as part of our future transition to CMake. Specifically zmq, libevent, libnatpmp, and miniupnpc all have existing CMake buildsystems. Building them with CMake will allow us to drop several deps that we currently have (autoconf, automake, pkg-config, etc) which would be unfortunate to carry over after the switch-over. But that's not relevant for this PR. This is just a very simple change that makes the above work easier to experiment with as it [adds a needed feature for CMake packages](theuni/bitcoin@5733dc2#diff-e6ed342a25092e0a6d0308e0bfd826044578847132cc6726ac4afa2ca767b61aR20). It's a no-op for the current builds. --- From commit description: This will allow us to use the existing machinery for filtering by arch, os, debug/release, etc. For example, the following becomes possible for libevent when building with CMake: `$(package)_config_opts_release=-DEVENT__DISABLE_DEBUG_MODE` Now the define is only set when not building depends with DEBUG=1 ACKs for top commit: hebasto: ACK 63c0c4f Tree-SHA512: 17d123219d2f98c017880196966ffebd5d09d3e2db8e443e227eb7e49da46e9d971fbe7fd2b99a324fc367e1bbe0ac3cd15b399bce98dd87fbb144d767e15fe7
2 parents c63c8a1 + 63c0c4f commit f3f5c97

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

depends/funcs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
176176
CXX="$$($(1)_cxx)" \
177177
CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
178178
LDFLAGS="$$($(1)_ldflags)" \
179-
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_cmake_opts)
179+
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts)
180180
ifeq ($($(1)_type),build)
181181
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
182182
else

depends/packages/libmultiprocess.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ endif
1010

1111
define $(package)_set_vars :=
1212
ifneq ($(host),$(build))
13-
$(package)_cmake_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp"
14-
$(package)_cmake_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++"
13+
$(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp"
14+
$(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++"
1515
endif
1616
endef
1717

0 commit comments

Comments
 (0)