Commit 72eb670e authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: refine boost third party find_package

parent 77ef8106
if (BUILD_TESTING)
set(OTB_Boost_OPTIONAL_COMPONENTS unit_test_framework)
endif()
# Required
message(STATUS "Looking for required Boost headers")
find_package ( Boost
......@@ -10,8 +6,16 @@ find_package ( Boost
)
# Optional components
# Boost (OPTIONAL_COMPONENTS does not work with Boost find_package)
# unit_test_framework component is used only in GdalAdapters module
if (BUILD_TESTING)
set(OTB_Boost_OPTIONAL_COMPONENTS unit_test_framework)
endif()
#Quiet find package to avoid message "Could not find boost" because unit_testing_framework is not installed
message(STATUS "Looking for optional Boost components : ${OTB_Boost_OPTIONAL_COMPONENTS}")
find_package ( Boost
QUIET
1.35.0
COMPONENTS ${OTB_Boost_OPTIONAL_COMPONENTS}
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment