-
Notifications
You must be signed in to change notification settings - Fork 6
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: Improve Boost checks #224
Conversation
It addresses @fanquake's concerns:
|
cmake/module/AddBoostIfNeeded.cmake
Outdated
#include <boost/test/unit_test.hpp> | ||
" HAVE_BOOST_UNIT_TEST_H | ||
) | ||
check_include_file_cxx(boost/test/unit_test.hpp HAVE_BOOST_UNIT_TEST_H) |
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 think I might be missing something, but this is still checking two headers.
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.
Thanks! Reworked.
Only one Boost.Test header is being checked now.
fa5c6c0
to
daca415
Compare
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.
Looks good, just think that comment could be slightly clearer
cmake/module/AddBoostIfNeeded.cmake
Outdated
#include <boost/test/included/unit_test.hpp> | ||
" HAVE_BOOST_INCLUDED_UNIT_TEST_H | ||
) | ||
# Some package managers, such as vcpkg, install Boost headers individually |
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.
# Some package managers, such as vcpkg, install Boost headers individually | |
# Some package managers, such as vcpkg, vendor Boost Test separately | |
# from the rest of the headers, so we have to check for it individually. |
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.
Thanks! Done.
Add vcpkg-specific comment.
Switch to `check_include_file_cxx` when checking headers. This speeds up configuration. Only one Boost.Test header is being checked now.
The first commit was requested offline.
The second commit speeds up configuration.