cmake --build assumes our build directory is build_fuzz, but cmake didn’t use -B build_fuzz, so simply copying and pasting the commands didn’t work.
cmake --build assumes our build directory is build_fuzz, but cmake didn’t use -B build_fuzz, so simply copying and pasting the commands didn’t work.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process. A summary of reviews will appear here.
I don’t understand this. The preset literally has it set to that:
0 "binaryDir": "${sourceDir}/build_fuzz",
cmake --buildassumes our build directory is build_fuzz, butcmakedidn’t use-B build_fuzz…
It does:https://github.com/bitcoin/bitcoin/blob/6e295d8ad5fff4dc07519f570e9a04ac57ecb639/CMakePresets.json#L41
Oh, I just checked my bash history. I did not actually copy and paste the commands. :sweat_smile:
I manually edited my cmake command for clean rebuilds to include --preset=libfuzzer and --build build_fuzz instead of --build build:
0$ rm -rf build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 --preset=libfuzzer -B build && cmake --build build_fuzz -j8
This obviously did not create build_fuzz, but build.
When I run cmake --preset=libfuzzer, like in the documentation, it does create build_fuzz.
Sorry! I was too quick to assume inconsistent documentation and push a fix. Should have looked into --preset first.
I guess I’m too used to inconsistent documentation (in other projects) haha :sweat_smile: