Skip to content
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

Merged
merged 13 commits into from
Jan 16, 2020
Merged

Conversation

simogasp
Copy link
Member

@simogasp simogasp commented Dec 5, 2019

  • removed variables and using Boost::*
  • added find_dependency for boost when AV is used as 3rd party

@simogasp simogasp added this to the 2019.3 milestone Dec 5, 2019
@@ -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)
Copy link
Member Author

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()

Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@fabiencastan fabiencastan merged commit bb78c6e into develop Jan 16, 2020
@fabiencastan fabiencastan deleted the cmake/modernBoost branch January 16, 2020 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants