target_data_sources()
function, which minimizes code needed to assign a *.json
or *.raw
data file to the test_bitcoin
or bench_bitcoin
target.
{test,bench}_bitcoin
targets
#30901
target_data_sources()
function, which minimizes code needed to assign a *.json
or *.raw
data file to the test_bitcoin
or bench_bitcoin
target.
This change introduces a new `target_data_sources()` function.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For detailed information about the code coverage, see the test coverage report.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | fjahr |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Reviewers, this pull request conflicts with the following ones:
std::vector<std::byte>{8}
to uint64_t
by l0rinc)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
134+ data/sighash.json
135+ data/tx_invalid.json
136+ data/tx_valid.json
137+ RAW_FILES
138+ data/asmap.raw
139+ RAW_NAMESPACE test::data
Once such a scenario happens, we can use another call:
0target_data_sources(test_bitcoin
1 RAW_FILES
2 data/some_file_with_another_namespace.raw
3 RAW_NAMESPACE somewhere::another_namespace
4)
And I think it is better than (1) specifying data/some_file_with_another_namespace.raw
to generate a header than (2) adding ${CMAKE_CURRENT_BINARY_DIR}/data/some_file_with_another_namespac.raw.h
to the sources.
tACK 0c35be69cf2a18a7a9173d0f9f88116b4417c892
I have based #28792 on this now. It works and seems like a nicer way to do what I need there than the previous approach.
Take it with a grain of salt though because I don’t think I am experienced enough with CMake to tell if there are any hidden issues with this approach or if there are even better ways to achieve this.
hebasto
DrahtBot
maflcko
fjahr
Labels
Build system