[cmake-developers] [CMake 0016016]: FindBoost.cmake has no support for OPTIONAL_COMPONENTS
Mantis Bug Tracker
mantis at public.kitware.com
Sun Mar 13 12:10:54 EDT 2016
The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=16016
======================================================================
Reported By: Mario Lang
Assigned To:
======================================================================
Project: CMake
Issue ID: 16016
Category: Modules
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-03-13 12:10 EDT
Last Modified: 2016-03-13 12:10 EDT
======================================================================
Summary: FindBoost.cmake has no support for
OPTIONAL_COMPONENTS
Description:
FindBoot.cmake has no support for the OPTIONAL_COMPONENTS keyword of
find_package().
If REQUIRED is passed, Boost_FOUND will be false if one of the
OPTIONAL_COMPONENTS was not found.
This seems easy to fix, the change boils down to
- if(NOT Boost_${COMPONENT}_FOUND)
+ if(NOT Boost_${COMPONENT}_FOUND AND Boost_FIND_REQUIRED_${component})
which seems simple enough.
Please consider the attached patch.
This is a long standing issue, at least a discussion from 2010 can be found
here:
https://cmake.org/pipermail/cmake/2010-August/039042.html
Steps to Reproduce:
find_package(Boost REQUIRED COMPONENTS filesystem OPTIONAL_COMPONENTS
not_published_yet)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-03-13 12:10 Mario Lang New Issue
2016-03-13 12:10 Mario Lang File Added: FindBoost.patch
======================================================================
More information about the cmake-developers
mailing list