-
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
Exporting Boost components #391
Comments
You can/should use So for example:
Note: if you only need Boost headers (i.e. the Note 2: I'm not sure how well this works with boost-python as I don't use it |
Do you mean Debian 8 (oldoldstable) has CMake 3.0, so it's broken anyway (ref #338), and Debian 9 (oldstable, 2017) has 3.7. Fedora 27 (2017) has 3.11. |
Nope, I really mean I'm basing this on a comment I made in a CMakeLists.txt which I'm pretty sure I added after a build failure on Xenial (I was still building on Trusty at the time but with CMake 3.5 too) Note: this can also be worked-around by using a more recent |
Ok, thanks |
So, currently in the module, we have a specific macro to handle Boost components. It would be nice to add the features of Optional and Required and Build components. In general, Boost.Python is not exported to link the target to an external target. |
I guess this is just a matter of adding parameters to the macro, and using add_project_dependency(Boost REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS} REQUIRED)
add_project_dependency(Boost REQUIRED COMPONENTS ${BOOST_OPTIONAL_COMPONENTS})
find_package(Boost REQUIRED COMPONENTS ${BOOST_REQUIRED_BUILD_COMPONENTS} REQUIRED)
find_package(Boost REQUIRED COMPONENTS ${BOOST_OPTIONAL_BUILD_COMPONENTS}) I can add that, but can you provide a way to test that I'm doing what you need ? |
I think Pinocchio is a good solution, or even hpp-fcl. |
add_project_dependency(Boost REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS} REQUIRED)
add_project_dependency(Boost REQUIRED COMPONENTS ${BOOST_OPTIONAL_COMPONENTS})
find_package(Boost REQUIRED COMPONENTS ${BOOST_REQUIRED_BUILD_COMPONENTS} REQUIRED)
find_package(Boost REQUIRED COMPONENTS ${BOOST_OPTIONAL_BUILD_COMPONENTS}) My two cents here:
# Check for it
find_package(OptLib QUIET)
if(OptLib_FOUND)
# Make it required in dependent project
add_project_dependency(OptLib REQUIRED)
endif() |
My two cents on this: we could just NOT append the package not found when calling find_package in add_project_dependency. |
Shouldn't SEARCH_FOR_BOOST use add_project_dependency instead of find_package ? |
A small remark to mention that at the time being, the Boost components are not exported at all by a project. We need to take on the fact that some of them are only BUILD dependencies, and should not be exported then.
The text was updated successfully, but these errors were encountered: