-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: Fix AddBoostIfNeeded
module
#312
Conversation
Can you elaborate. Why does it fail (what failure?) on some systems? |
Here is an excerpt from
|
Pass `-DBOOST_NO_CXX98_FUNCTION_BASE` to the header check only when applicable. We have to pass it if accepted; otherwise, the test header check may fail on some systems, such as macOS arm64 + Homebrew's boost@1.76.
589aba9
to
dcdf37a
Compare
Rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get what is actually broken and was not able to reproduce this on x86 macos and boost 1.84, but the patch makes sense to me outside of fixing an actual build failure.
@TheCharlatan if you do a build with cmake-staging (ad73445) on macOS with -- Found Boost: /opt/homebrew/include (found suitable version "1.85.0", minimum required is "1.73.0")
-- Performing Test NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE
-- Performing Test NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE - Failed
-- Looking for C++ include boost/test/included/unit_test.hpp
-- Looking for C++ include boost/test/included/unit_test.hpp - not found
CMake Error at cmake/module/AddBoostIfNeeded.cmake:72 (message):
Building test_bitcoin executable requested but
boost/test/included/unit_test.hpp header not available.
Call Stack (most recent call first):
CMakeLists.txt:410 (add_boost_if_needed) |
Ah, thanks, I see the failure now on macos and it passing with this patch. |
Warnings from system headers are suppressed by both clang and gcc. That is, |
Cross-posted from bitcoin#30454 (comment):
This PR addresses the first part (see the commit message for more details).
The second one remains unaddressed for the following reasons:
-DWERROR=ON
(or--enable-debug
in Autotools) was never used to control passing the-Werror
flag to checks of any type.-Werror
in check for header availability. It is not clear whyunit_test.hpp
should be an exception.Please correct me if my understanding is wrong.