diff options
author | Sergiu Deitsch <sergiu.deitsch@gmail.com> | 2018-01-14 10:42:48 (GMT) |
---|---|---|
committer | Sergiu Deitsch <sergiu.deitsch@th-nuernberg.de> | 2018-01-19 16:00:44 (GMT) |
commit | 2557cad5ec5084f86d4bb56c82939a49fc9d3071 (patch) | |
tree | d23f50924e34f79dacf9585c5dba3de14429a122 /Modules/FindBoost.cmake | |
parent | 7b78242d602c5ffa1831478ef624bc41642ca1ff (diff) | |
download | CMake-2557cad5ec5084f86d4bb56c82939a49fc9d3071.zip CMake-2557cad5ec5084f86d4bb56c82939a49fc9d3071.tar.gz CMake-2557cad5ec5084f86d4bb56c82939a49fc9d3071.tar.bz2 |
FindBoost: support OPTIONAL_COMPONENTS
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r-- | Modules/FindBoost.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index ca2a9c5..4a55588 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -13,6 +13,9 @@ # [version] [EXACT] # Minimum or EXACT version e.g. 1.36.0 # [REQUIRED] # Fail with error if Boost is not found # [COMPONENTS <libs>...] # Boost libraries by their canonical name +# # e.g. "date_time" for "libboost_date_time" +# [OPTIONAL_COMPONENTS <libs>...] +# # Optional Boost libraries by their canonical name) # ) # e.g. "date_time" for "libboost_date_time" # # This module finds headers and requested component libraries OR a CMake @@ -1777,10 +1780,9 @@ if(Boost_FOUND) set(_boost_CHECKED_COMPONENT FALSE) set(_Boost_MISSING_COMPONENTS "") foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} COMPONENT) + string(TOUPPER ${COMPONENT} UPPERCOMPONENT) set(_boost_CHECKED_COMPONENT TRUE) - if(NOT Boost_${COMPONENT}_FOUND) - string(TOLOWER ${COMPONENT} COMPONENT) + if(NOT Boost_${UPPERCOMPONENT}_FOUND AND Boost_FIND_REQUIRED_${COMPONENT}) list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) endif() endforeach() |