I built CMake 4.0.0 like this (on a Rocky Linux 9 host):
bootstrap --prefix=/usr/local
make -j$(nproc) && make -j$(nproc) install/strip
/usr/local/share/cmake-4.0/Modules/FindBoost.cmake (among 444 other modules) was installed.
But find_package does not seem to find it. In the output is also the result of these two lines from my CMakeLists.txt:
message(STATUS "CMake system module path: ${CMAKE_SYSTEM_MODULE_PATH}")
message(STATUS "CMake module path: ${CMAKE_MODULE_PATH}")
[proc] Executing command: /usr/local/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ --no-warn-unused-cli -S/repo/service-core -B/repo/service-core/build -G "Unix Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- Found Git: /usr/bin/git (found version "2.43.5")
[cmake] -- The CXX compiler identification is GNU 11.5.0
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: /usr/bin/g++ - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- CMake system module path:
[cmake] -- CMake module path: /repo/service-core/cmake
[cmake] -- Found OpenSSL: /usr/lib64/libcrypto.so (found suitable version "3.2.2", minimum required is "3.0")
[cmake] -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
[cmake] -- Found OpenSSL: /usr/lib64/libcrypto.so (found version "3.2.2")
[cmake] CMake Error at /usr/local/share/cmake-4.0/Modules/CMakeFindDependencyMacro.cmake:78 (find_package):
[cmake] By not providing "FindBoost.cmake" in CMAKE_MODULE_PATH this project has
[cmake] asked CMake to find a package configuration file provided by "Boost", but
[cmake] CMake did not find one.
The upstream provided CMake 3.26.5 did not have this problem. But I needed generator expressions for CXX_CPPCHECK, thus I decided to upgrade.
Can anybody help me find out what is wrong?