-
Notifications
You must be signed in to change notification settings - Fork 37.7k
depends: reuse _config_opts for CMake options #27496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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: $(package)_config_opts_release=-DEVENT__DISABLE_DEBUG_MODE Now the define is only set when not building depends with DEBUG=1
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
Ping @hebasto. This should be easy to review, only verifying that it's currently a no-op :) |
Concept ACK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 63c0c4f
This change allows to reuse this machinery:
Lines 128 to 131 in d26a71a
$(1)_config_opts+=$$($(1)_config_opts_$(release_type)) | |
$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)) $$($(1)_config_opts_$(host_arch)_$(release_type)) | |
$(1)_config_opts+=$$($(1)_config_opts_$(host_os)) $$($(1)_config_opts_$(host_os)_$(release_type)) | |
$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)_$(host_os)) $$($(1)_config_opts_$(host_arch)_$(host_os)_$(release_type)) |
I know it's not relevant for this PR, but is the plan to upstream CMake support everywhere it's missing (sqlite, all the qt deps etc), and maintain it ourselves where it's not upstreamable (i.e bdb), otherwise we still can't drop any deps. |
Technically there's no need to switch all projects to CMake, I'm mostly doing it because if it's going to be a dependency anyway, we might as well use it. However... Even after switching to CMake, as is, we'd still have autotools dependencies. Most of our deps (like bdb) are pre-bootstrapped and require only bash and make. However, zmq for example currently requires running Using CMake for deps would allow us to install the CMake files rather than the .pc for libevent/miniupnpc, meaning that we can drop pkg-config as a build-requirement as well (relegating it to an optional fallback). |
Guix Build: 45d96de0248ec8b604cc5c980f1abbc780862d497f195a795c6088087d646c73 guix-build-63c0c4ff10b2/output/aarch64-linux-gnu/SHA256SUMS.part
ebdd087cbb45f1fa337b717c0d7bd53c8b7d0bc78d4e9693de2430a1ab9e03d9 guix-build-63c0c4ff10b2/output/aarch64-linux-gnu/bitcoin-63c0c4ff10b2-aarch64-linux-gnu-debug.tar.gz
e09206e6a70068036ea52731e0f8122665525a132e85f2798662ff9d7644dd8b guix-build-63c0c4ff10b2/output/aarch64-linux-gnu/bitcoin-63c0c4ff10b2-aarch64-linux-gnu.tar.gz
20e71234d2e90386e3c6814a187d8e46251353fbb734c9a740f520f294a94edf guix-build-63c0c4ff10b2/output/arm-linux-gnueabihf/SHA256SUMS.part
6ed4e30ab3e6bd504ee0a38585e2275d24f88f45860d2506cd0c9999afa8c5e7 guix-build-63c0c4ff10b2/output/arm-linux-gnueabihf/bitcoin-63c0c4ff10b2-arm-linux-gnueabihf-debug.tar.gz
5208d76122eace9da786a59c19834a7ebc8f45df1fcb31439a95ec9a11678574 guix-build-63c0c4ff10b2/output/arm-linux-gnueabihf/bitcoin-63c0c4ff10b2-arm-linux-gnueabihf.tar.gz
5284ca387b116cc60c28f6df70d3acbd08b41295568dc486b197d0976e9626be guix-build-63c0c4ff10b2/output/arm64-apple-darwin/SHA256SUMS.part
e9cd8abfa5d3dc27afdb5f82dca667c47bb4a3308655b3120e257d4a20c75020 guix-build-63c0c4ff10b2/output/arm64-apple-darwin/bitcoin-63c0c4ff10b2-arm64-apple-darwin-unsigned.dmg
fb272c2b89629a9e79d53db1e7694ef0ee8c2159c19644535b62e4d84dd3431d guix-build-63c0c4ff10b2/output/arm64-apple-darwin/bitcoin-63c0c4ff10b2-arm64-apple-darwin-unsigned.tar.gz
e8ef0ddd6216b26c43d21197e378db78e60bc32b5226dc76af40cfa7725417b1 guix-build-63c0c4ff10b2/output/arm64-apple-darwin/bitcoin-63c0c4ff10b2-arm64-apple-darwin.tar.gz
0935261a1364e2e2dbe4a3f728bfc09c10da58bba3f5702f51dbc18ca0705532 guix-build-63c0c4ff10b2/output/dist-archive/bitcoin-63c0c4ff10b2.tar.gz
fd1a4b95218d134b6934fa8e8eea49b00d77d5541bb63c4a5857326fc794e803 guix-build-63c0c4ff10b2/output/powerpc64-linux-gnu/SHA256SUMS.part
a7b1b0aecc0aad1a04baa7fe24c32b25541f1e530b0ae16bf84d390a7d5504c6 guix-build-63c0c4ff10b2/output/powerpc64-linux-gnu/bitcoin-63c0c4ff10b2-powerpc64-linux-gnu-debug.tar.gz
d2ca3503379a740b1be8a9f650d02bd135ecb5fa9f50b2b8a059dba2f2b8817f guix-build-63c0c4ff10b2/output/powerpc64-linux-gnu/bitcoin-63c0c4ff10b2-powerpc64-linux-gnu.tar.gz
91e925d8537db82770f2f3132b9626db2ab57c59b4d2f287816e4d3810b9d9f4 guix-build-63c0c4ff10b2/output/powerpc64le-linux-gnu/SHA256SUMS.part
24cbe302f549b0921e538eba093ab79144d023a4ce4c15c7a5e0bd0def25d03d guix-build-63c0c4ff10b2/output/powerpc64le-linux-gnu/bitcoin-63c0c4ff10b2-powerpc64le-linux-gnu-debug.tar.gz
3ea323b0da18c6366e99a1aee13b819446c9bfe905d6c8b2675bdf627aee8b97 guix-build-63c0c4ff10b2/output/powerpc64le-linux-gnu/bitcoin-63c0c4ff10b2-powerpc64le-linux-gnu.tar.gz
0023efa23eb9a9e36c7a466443996b949dd78644ea03bcdf2c2a10c4f612c487 guix-build-63c0c4ff10b2/output/riscv64-linux-gnu/SHA256SUMS.part
b7e8f339047c0392a36aedf7f560e0c514187a85f9b800863d9d2a1a48df54e3 guix-build-63c0c4ff10b2/output/riscv64-linux-gnu/bitcoin-63c0c4ff10b2-riscv64-linux-gnu-debug.tar.gz
8abecebf5c0e27e896e13c1727e5ab14b2ce86eb78ad56525a412f4141e6f4a7 guix-build-63c0c4ff10b2/output/riscv64-linux-gnu/bitcoin-63c0c4ff10b2-riscv64-linux-gnu.tar.gz
70becd3e4435474eb79b1ee7d2afd179573b1e1bd887296a59af4145538357bc guix-build-63c0c4ff10b2/output/x86_64-apple-darwin/SHA256SUMS.part
e2864c806fe6205c52c6cd7155f27320ad5d36134c2dcdca44d601330c6fe48c guix-build-63c0c4ff10b2/output/x86_64-apple-darwin/bitcoin-63c0c4ff10b2-x86_64-apple-darwin-unsigned.dmg
35fe2c5542cfef532ce9c6467a9f88b3d5eb77ce84b20d183be92cf0003f4309 guix-build-63c0c4ff10b2/output/x86_64-apple-darwin/bitcoin-63c0c4ff10b2-x86_64-apple-darwin-unsigned.tar.gz
a911096e5fde32f22bc20bfd66a1f8e265a21a124dc9718de25366e9fedd9708 guix-build-63c0c4ff10b2/output/x86_64-apple-darwin/bitcoin-63c0c4ff10b2-x86_64-apple-darwin.tar.gz
89e61a460cb5d8ca66a0ab782bad8dfd68fa84ef5179084b07983e689a64f8a9 guix-build-63c0c4ff10b2/output/x86_64-linux-gnu/SHA256SUMS.part
bdb9e4ee51d7a23700d37b70154ad02d40065a8f5aac4538b175a3d88e09a7c2 guix-build-63c0c4ff10b2/output/x86_64-linux-gnu/bitcoin-63c0c4ff10b2-x86_64-linux-gnu-debug.tar.gz
82cca61849ac3a2b440f141932b0b1feeddcece9a434fe18ae86c7ea65044ad5 guix-build-63c0c4ff10b2/output/x86_64-linux-gnu/bitcoin-63c0c4ff10b2-x86_64-linux-gnu.tar.gz
e87d392f0f2435bbc519b5fd826c26856d32f03a45c757b58426526d538245f2 guix-build-63c0c4ff10b2/output/x86_64-w64-mingw32/SHA256SUMS.part
2c4a9cf5cd04c4403c07a6c7f225a29061c1fd024287989d885cb269e19911a1 guix-build-63c0c4ff10b2/output/x86_64-w64-mingw32/bitcoin-63c0c4ff10b2-win64-debug.zip
94711204e5c857fd14f05d95bda0e5b9c8ad52786c1a3d8778d7c8cc3e9b7fe4 guix-build-63c0c4ff10b2/output/x86_64-w64-mingw32/bitcoin-63c0c4ff10b2-win64-setup-unsigned.exe
f3f6084978261f3e32dd5cc77e8026fd0cabdcec98f029adad757b9746a5b893 guix-build-63c0c4ff10b2/output/x86_64-w64-mingw32/bitcoin-63c0c4ff10b2-win64-unsigned.tar.gz
a2acaa75de0de81b0b8b0553c7b60e5845f9f9b078756cc06e3046cc6dbcf688 guix-build-63c0c4ff10b2/output/x86_64-w64-mingw32/bitcoin-63c0c4ff10b2-win64.zip |
My Guix builds:
|
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@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
Context: I'm currently experimenting with building our depends with CMake when possible 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. 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