-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
libboost-headers CMake 3.30 compatibility #226
Comments
The problem is that we cannot split a single file (like So unfortunately, I don't think there's a realistic alternative to using the full |
Wouldn't the In particular, I.e. [for reference] Citing the # Find boost_headers
boost_find_component(headers 1 0)
if(NOT boost_headers_FOUND)
set(Boost_FOUND 0)
set(Boost_NOT_FOUND_MESSAGE "A required dependency, boost_headers, has not been found.")
return()
endif()
# Compatibility variables
set(Boost_MAJOR_VERSION ${Boost_VERSION_MAJOR})
set(Boost_MINOR_VERSION ${Boost_VERSION_MINOR})
set(Boost_SUBMINOR_VERSION ${Boost_VERSION_PATCH})
set(Boost_VERSION_STRING ${Boost_VERSION})
set(Boost_VERSION_MACRO ${Boost_VERSION_MAJOR}0${Boost_VERSION_MINOR}0${Boost_VERSION_PATCH})
get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
set(Boost_LIBRARIES "")
# Find components
if("ALL" IN_LIST Boost_FIND_COMPONENTS)
# Make sure "ALL" is the only requested component.
list(LENGTH Boost_FIND_COMPONENTS __boost_find_components_count)
if(NOT ${__boost_find_components_count} EQUAL 1)
message(AUTHOR_WARNING "ALL cannot be combined with named components; the named components will be ignored.")
endif()
unset(__boost_find_components_count)
set(Boost_ALL_TARGETS Boost::headers)
boost_find_all_components()
else()
foreach(__boost_comp IN LISTS Boost_FIND_COMPONENTS)
boost_find_component(${__boost_comp} ${Boost_FIND_REQUIRED_${__boost_comp}} 0)
endforeach()
endif() |
That's the main issue, because a lot of packages are not specifying explicit components. |
I understand. What about the following?
I get that it requires a change to the CMakeLists but maybe this is a sustainable solution. Alternatively, maybe it's possible to do something along the lines of set(Boost_HEADER_ONLY TRUE) # or maybe even as a CACHE entry
find_package(Boost CONFIG) |
Comment:
Is there a way to get
libboost-headers
(or equivalent; i.e. without any binaries) as well as aBoostConfig.cmake
file?We develop tooling with a header-only core and use
conda-forge/libboost-headers
to install the installed Boost headers as a dependency (for Windows). Up until recently, that has worked just fine. Recently, however, CMake has decided to phase outFindBoost.cmake
. That means that we are unfortunately forced to either:OLD
libboost-devel
It would be great if we could have a
libboost-headers-devel
(or similar), that's compatible with both the most recent CMake policy and the smaller dependency size.I am willing to contribute myself if needed.
The text was updated successfully, but these errors were encountered: