-
-
Notifications
You must be signed in to change notification settings - Fork 827
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] using modern cmake for boost #719
Conversation
f6e221a
to
5eb0bb6
Compare
manually adding it may result in double flag
src/CMakeLists.txt
Outdated
@@ -252,7 +252,7 @@ endif() | |||
# ============================================================================== | |||
option(BOOST_NO_CXX11 "if Boost is compiled without C++11 support (as it is often the case in OS packages) this must be enabled to avoid symbol conflicts (SCOPED_ENUM)." OFF) | |||
set(ALICEVISION_BOOST_COMPONENTS atomic container date_time filesystem graph log log_setup program_options regex serialization system thread timer) | |||
find_package(Boost 1.60.0 QUIET CONFIG COMPONENTS ${ALICEVISION_BOOST_COMPONENTS}) | |||
find_package(Boost 1.60.0 QUIET COMPONENTS ${ALICEVISION_BOOST_COMPONENTS} unit_test_framework) |
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.
if(ALICEVISION_BUILD_TESTS)
list(APPEND ALICEVISION_BOOST_COMPONENTS unit_test_framework)
endif()
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.
But unit_test_framework should not be exported in the Config as it's not needed when AliceVision is used as an external library.
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.
true.
But if you use it as 3rd party normally you don't build the tests that are set to OFF by default.
Nevertheless, we need some conditions here, because for the same reason you don't need to find the test framework if you are not building the tests
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.
sure
Boost::*
find_dependency
for boost when AV is used as 3rd party