Skip to content

cmake: Disable automatic C++20 module dependency scanning - #355

Open
ryanofsky wants to merge 1 commit into
bitcoin-core:masterfrom
ryanofsky:pr/cmake-nomodules
Open

cmake: Disable automatic C++20 module dependency scanning#355
ryanofsky wants to merge 1 commit into
bitcoin-core:masterfrom
ryanofsky:pr/cmake-nomodules

Conversation

@ryanofsky

Copy link
Copy Markdown
Collaborator

Set CMAKE_CXX_SCAN_FOR_MODULES off because this project doesn't use C++ modules, and they are enabled by default in newer versions of cmake, which can lead to failures trying to invoke the clang-scan-deps tool if it is not installed.

… cmake policies

With latest cmake policies, specifically CMP0155, openbsd and freebsd CI
jobs fail due to a lack of a clang-scan-deps tool. The tool could
potentially be installed on these platforms but it is unclear how to do
that and the project isn't using modules anyway, so just disable them
here. Errors look like:

+ cmake --build . --parallel -t all tests mpexamples -- -k 0
[1/114] Scanning /home/runner/work/libmultiprocess/libmultiprocess/src/mp/util.cpp for CXX dependencies
FAILED: CMakeFiles/mputil.dir/src/mp/util.cpp.o.ddi
"CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND" -format=p1689 -- /usr/bin/c++  -I/home/runner/work/libmultiprocess/libmultiprocess/include -I/home/runner/work/libmultiprocess/libmultiprocess/build-openbsd/include -isystem /usr/local/include -Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -std=gnu++20 -x c++ /home/runner/work/libmultiprocess/libmultiprocess/src/mp/util.cpp -c -o CMakeFiles/mputil.dir/src/mp/util.cpp.o -resource-dir "/usr/lib/clang/16" -MT CMakeFiles/mputil.dir/src/mp/util.cpp.o.ddi -MD -MF CMakeFiles/mputil.dir/src/mp/util.cpp.o.ddi.d > CMakeFiles/mputil.dir/src/mp/util.cpp.o.ddi.tmp && mv CMakeFiles/mputil.dir/src/mp/util.cpp.o.ddi.tmp CMakeFiles/mputil.dir/src/mp/util.cpp.o.ddi
/bin/sh: CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND: not found
@DrahtBot

DrahtBot commented Aug 20, 2026

Copy link
Copy Markdown

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

@maflcko

maflcko commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

-0
Seems odd to split this out when it can't happen in reality. Seems better to leave this as part of #209, so that review is easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants