Commit graph

141 commits

Author SHA1 Message Date
Tom Trevethan
0916a2acfb
rename test_bitcoin to test_elements 2026-05-26 14:15:17 +01:00
Tom Trevethan
33ff16cbac
build: fix windows/mingw build 2026-05-07 20:34:28 +01:00
ivanlele
b5e6de5703
Merge c2341ebb5b into merged_master (Bitcoin PR bitcoin/bitcoin#31983) 2026-04-16 13:36:10 +00:00
ivanlele
e33910c474
Merge 79bbb381a1 into merged_master (Bitcoin PR bitcoin/bitcoin#30901) 2026-04-16 13:19:28 +00:00
ivanlele
abe38da954
Merge 0bb8a01810 into merged_master (Bitcoin PR bitcoin/bitcoin#31880) 2026-04-16 13:08:25 +00:00
ivanlele
1fd8510334
Merge da3ed8b970 into merged_master (Bitcoin PR bitcoin/bitcoin#31662) 2026-04-16 12:21:04 +00:00
ivanlele
5c30fff21d
Merge 82ba925715 into merged_master (Bitcoin PR bitcoin/bitcoin#31366) 2026-04-16 12:09:39 +00:00
ivanlele
d5ef0e2f02
Merge 43e287b3ff into merged_master (Bitcoin PR bitcoin/bitcoin#31892) 2026-04-16 11:12:02 +00:00
ivanlele
eef25fd42f
Merge 28dec6c5f8 into merged_master (Bitcoin PR bitcoin/bitcoin#31268) 2026-04-16 11:00:57 +00:00
Tom Trevethan
a1a5adee04 Merge 06b9236f43 into merged_master (Bitcoin PR bitcoin/bitcoin#31359) 2026-04-15 23:20:36 +01:00
Tom Trevethan
189a598a2a Merge 73e2ec1373 into merged_master (Bitcoin PR bitcoin/bitcoin#31844) 2026-04-15 22:53:42 +01:00
Tom Trevethan
245617c480 Merge 55cf39e4c5 into merged_master (Bitcoin PR bitcoin/bitcoin#31722) 2026-04-15 13:58:24 +01:00
Tom Trevethan
d1715bf4b5 Merge ede388d03d into merged_master (Bitcoin PR bitcoin/bitcoin#30911) 2026-04-15 13:50:47 +01:00
Tom Trevethan
0769cf8a98 Merge 0b6ed342b5 into merged_master (Bitcoin PR bitcoin/bitcoin#31711) 2026-04-15 13:41:27 +01:00
Tom Trevethan
c1c9b145b7 Merge a44ccedcc2 into merged_master (Bitcoin PR bitcoin/bitcoin#31818) 2026-04-15 13:41:13 +01:00
ikripaka
be7caa853a
Merge 8fc7140846 into merged_master (Bitcoin PR bitcoin/bitcoin#31671) 2026-04-10 11:28:50 +00:00
ivanlele
2fa9dc38d2
Merge 4036ee3f2b into merged_master (Bitcoin PR bitcoin/bitcoin#31542) 2026-04-09 13:46:18 +00:00
ivanlele
af292df457
Merge eb2ebe6f30 into merged_master (Bitcoin PR bitcoin/bitcoin#31231) 2026-04-08 13:52:04 +00:00
ivanlele
a9df14c956
Merge 8d340be924 into merged_master (Bitcoin PR bitcoin/bitcoin#31181) 2026-04-03 08:14:04 +00:00
ivanlele
b766b3f8c8
Merge 19f277711e into merged_master (Bitcoin PR bitcoin/bitcoin#26593) 2026-04-02 15:08:15 +00:00
ivanlele
cbad0e0ef9
Merge 45e2f8f87d into merged_master (Bitcoin PR bitcoin/bitcoin#31173) 2026-04-02 13:24:37 +00:00
ivanlele
9decd13df6
Merge 85224f92d5 into merged_master (Bitcoin PR bitcoin/bitcoin#30811) 2026-04-02 12:40:02 +00:00
Tom Trevethan
bb2657cc2d Merge dc97e7f6db into merged_master (Bitcoin PR bitcoin/bitcoin#30903) 2026-04-01 23:02:28 +01:00
Tom Trevethan
030ab66c70 Merge 54c4b09f08 into merged_master (Bitcoin PR bitcoin/bitcoin#31042) 2026-04-01 22:41:52 +01:00
Tom Trevethan
1244d0d5a3 Merge 6e21dedbf2 into merged_master (Bitcoin PR bitcoin/bitcoin#31130) 2026-04-01 13:36:19 +01:00
ivanlele
55dd6d547d
Merge 9f45062b9b into merged_master (Bitcoin PR bitcoin/bitcoin#30937) 2026-03-30 10:51:11 +00:00
ivanlele
8318484912
Merge ec58dfe8f7 into merged_master (Bitcoin PR bitcoin/bitcoin#31010) 2026-03-27 14:20:47 +00:00
ivanlele
1f6c8b929f
Merge c33eb2360e into merged_master (Bitcoin PR bitcoin/bitcoin#30043) 2026-03-27 11:35:17 +00:00
ivanlele
e8b733a7b2
Merge 2a0949f097 into merged_master (Bitcoin PR bitcoin/bitcoin#30888) 2026-03-26 14:03:13 +00:00
ivanlele
e20f63d245
Merge 07c7c96022 into merged_master (Bitcoin PR bitcoin/bitcoin#30883) 2026-03-25 16:54:59 +00:00
ivanlele
1259c13ba5
Merge db8350b0e3 into merged_master (Bitcoin PR bitcoin/bitcoin#30803) 2026-03-25 15:32:18 +00:00
ivanlele
55ee06f0d9
Merge a86e7a476d into merged_master (Bitcoin PR bitcoin/bitcoin#30838) 2026-03-25 14:55:09 +00:00
ivanlele
165fefb6e4
Merge 155963768a into merged_master (Bitcoin PR bitcoin/bitcoin#30842) 2026-03-25 14:16:12 +00:00
ivanlele
7c12a0a5b0
Merge ba84c2774d into merged_master (Bitcoin PR bitcoin/bitcoin#30823) 2026-03-25 11:42:36 +00:00
ivanlele
4fcd6f4927
Merge c3af4b1ec3 into merged_master (Bitcoin PR bitcoin/bitcoin#30822) 2026-03-25 10:02:16 +00:00
ivanlele
0501efa402
Merge 6852d1d487 into merged_master (Bitcoin PR bitcoin/bitcoin#30796) 2026-03-25 09:34:43 +00:00
ivanlele
b1b308f6e7
Merge fa05ee0517 into merged_master (Bitcoin PR bitcoin/bitcoin#30772) 2026-03-25 09:28:30 +00:00
ivanlele
c9b157ccbf
Merge ab317ad2ef into merged_master (Bitcoin PR bitcoin/bitcoin#30804) 2026-03-24 14:35:57 +00:00
ivanlele
26176c3cd4
Migrate elements build to Cmake 2026-03-24 11:11:11 +00:00
fanquake
c718bffc36
build: don't use ccache with MSVC
Set WITH_CCACHE to OFF for MSVC, so it doesn't show as ON in the
configure summary.

Fixes #31771.
2025-03-04 14:53:06 +00:00
merge-script
79bbb381a1
Merge bitcoin/bitcoin#30901: cmake: Revamp handling of data files
ecf54a32ed cmake: Add support for builtin `codegen` target (Hennadii Stepanov)
a8c78a0574 cmake: Revamp handling of data files (Hennadii Stepanov)

Pull request description:

  This PR leverages the approach from the https://github.com/chaincodelabs/libmultiprocess project and introduces a new functions `target_json_data_sources()` and `target_raw_data_sources()`, which minimize the amount of code required to assign to assign a `*.json` or `*.raw` data file to the `test_bitcoin`,  `bench_bitcoin` or `unitester` targets.

  As requested in https://github.com/bitcoin/bitcoin/pull/30901#issuecomment-2654622689, the `codegen` build target is now supported, if available:
  ```
  $ cmake --version
  cmake version 3.31.5

  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  $ cmake -G "Ninja" -B build
  $ cmake --build build --target codegen
  ```

ACKs for top commit:
  fjahr:
    re-ACK ecf54a32ed
  Sjors:
    re-tACK ecf54a32ed
  theuni:
    ACK ecf54a32ed

Tree-SHA512: bab92df6b81c47d9d97ba8db37470a6d7aa435d5578afe40df7154885eda55afc59f0bf20dc9db3b2fd88ceb9a0319b9678f9e9af01e7afd4851ec3a79f3f402
2025-03-03 14:41:05 +00:00
merge-script
0bb8a01810
Merge bitcoin/bitcoin#31880: cmake: Add optional sources to minisketch library directly
9919e92022 cmake: Add optional sources to `minisketch` library directly (Hennadii Stepanov)

Pull request description:

  This PR is a continuation of https://github.com/bitcoin/bitcoin/pull/31268 and applies similar changes to the `minisketch` library, which addresses [this comment](https://github.com/bitcoin/bitcoin/pull/30911#discussion_r1953081930).

  Additionally, a [workaround](db36a92c02/cmake/minisketch.cmake (L77-L78)) for a CMake bug has been removed.

ACKs for top commit:
  theuni:
    utACK 9919e92022

Tree-SHA512: e41618ad6420d3e81960a4691d28b6c143c335e10edcae207cfc1e7743cf85aeab46ae495a5434469f45518db65cd8c18dc4d7815993e6d35aaf2abdcdb43f6b
2025-02-25 14:11:58 -05:00
Hennadii Stepanov
ecf54a32ed
cmake: Add support for builtin codegen target
Additionally, this change removes unnecessary braces in the `if()`
command for improved robustness, readability and consistency with CMake
guidelines.
2025-02-21 11:11:30 +00:00
Hennadii Stepanov
a8c78a0574
cmake: Revamp handling of data files
This change introduces new functions `target_json_data_sources()` and
`target_raw_data_sources()`.
2025-02-21 11:11:29 +00:00
merge-script
da3ed8b970
Merge bitcoin/bitcoin#31662: cmake: Do not modify CMAKE_TRY_COMPILE_TARGET_TYPE globally
2c4b229c90 cmake: Introduce `FUZZ_LIBS` (Hennadii Stepanov)
ea929c0848 scripted-diff: Rename CMake helper module (Hennadii Stepanov)
8d238c1dfd cmake: Delete `check_cxx_source_links*` macros (Hennadii Stepanov)
71bf8294a9 cmake: Convert `check_cxx_source_compiles_with_flags` to a function (Hennadii Stepanov)
88ee6800c9 cmake: Delete `check_cxx_source_links_with_flags` macro (Hennadii Stepanov)
09e8fd25b1 build: Don't override CMake's default try_compile target (Hennadii Stepanov)

Pull request description:

  This was requested in https://github.com/bitcoin/bitcoin/pull/31359#issuecomment-2515287092.

  From https://github.com/bitcoin/bitcoin/pull/31359#issuecomment-2511246212:
  > (Almost?) every CMake check internally uses the [`try_compile()`](https://cmake.org/cmake/help/latest/command/try_compile.html) command, whose behaviour, in turn, depends on the [`CMAKE_TRY_COMPILE_TARGET_TYPE`](https://cmake.org/cmake/help/latest/variable/CMAKE_TRY_COMPILE_TARGET_TYPE.html) variable:
  >
  >    1. The default value, `EXECUTABLE`, enables both compiler and linker checks.
  >
  >    2. The `STATIC_LIBRARY` value enables only compiler checks.
  >
  >
  > To mimic Autotools' behaviour, we [disabled](d3f42fa08f/cmake/module/CheckSourceCompilesAndLinks.cmake (L9-L10)) linker checks by setting `CMAKE_TRY_COMPILE_TARGET_TYPE` to `STATIC_LIBRARY` globally (perhaps not the best design). This effectively separates the entire CMake script into regions where `CMAKE_TRY_COMPILE_TARGET_TYPE` is:
  >
  >    * unset
  >
  >    * set to `STATIC_LIBRARY`
  >
  >    * set to `EXECUTABLE`

  From https://github.com/bitcoin/bitcoin/pull/31359#issuecomment-2515287092:
  > > This seems very fragile and unintuitive, and the fact that this could silently break at any point is not documented in any way. I don't think other bad design decisions should lead to us having to write even more boilerplate code to fix things that should "just work" (minus the upstream bugs).
  >
  > Agreed. I forgot that we set `CMAKE_TRY_COMPILE_TARGET_TYPE` globally. And even worse, it's buried in a module. If that upsets CMake internal tests, I think we should undo that.

  This PR ensures that `CMAKE_TRY_COMPILE_TARGET_TYPE` is modified only within local scopes.

  Additionally, the `FUZZ_LIBS` variable has been introduced to handle additional libraries required for linking, rather than link options, in certain build environment, such as OSS-Fuzz.

ACKs for top commit:
  TheCharlatan:
    Re-ACK 2c4b229c90
  theuni:
    utACK 2c4b229c90

Tree-SHA512: f72ffa8f50f216fc1a2f8027ba8ddfd4acd42b94ff6c1cb2138f2da51eb8f945660e97d3c247d7f3f7ec8dfebbccec3ab84347d6ae2e3f8a40f3d7aa8b14cde9
2025-02-20 15:07:03 -05:00
merge-script
82ba925715
Merge bitcoin/bitcoin#31366: cmake: Check -Wno-* compiler options for leveldb target
9e4a4b4832 cmake: Check `-Wno-*` compiler options for `leveldb` target (Hennadii Stepanov)

Pull request description:

  Otherwise, https://cirrus-ci.com/task/4830737755537408:
  ```
  At global scope:
  cc1plus: note: unrecognized command-line option ‘-Wno-conditional-uninitialized’ may have been intended to silence earlier diagnostics
  ```

ACKs for top commit:
  TheCharlatan:
    ACK 9e4a4b4832

Tree-SHA512: 05553c80399180e01d45c3f02074ca0ce620011b29b03bef5433b87c9d88fd281fb6bf0203fc6fff590f3780c182a3fab8307002536b6350e03748420c346602
2025-02-20 12:22:20 -05:00
Hennadii Stepanov
ea929c0848
scripted-diff: Rename CMake helper module
-BEGIN VERIFY SCRIPT-
git mv cmake/module/CheckSourceCompilesAndLinks.cmake cmake/module/CheckSourceCompilesWithFlags.cmake
sed -i 's|\<CheckSourceCompilesAndLinks\>|CheckSourceCompilesWithFlags|g' $(git grep -l 'CheckSourceCompilesAndLinks')
-END VERIFY SCRIPT-
2025-02-20 12:39:20 +00:00
Hennadii Stepanov
8d238c1dfd
cmake: Delete check_cxx_source_links* macros 2025-02-20 12:39:12 +00:00
Hennadii Stepanov
71bf8294a9
cmake: Convert check_cxx_source_compiles_with_flags to a function 2025-02-20 12:39:03 +00:00
Hennadii Stepanov
88ee6800c9
cmake: Delete check_cxx_source_links_with_flags macro 2025-02-20 12:38:55 +00:00