boost-cmake / boost

Cmake-based build of boost
Boost Software License 1.0
58 stars 24 forks source link

Use of `find_package` rather than `find_dependency` #1

Closed rleigh-codelibre closed 6 years ago

rleigh-codelibre commented 7 years ago

Logic such as this:

if(boost_throw_exception_FOUND)
file(APPEND "${PROJECT_BINARY_DIR}/boost_mpi-config.cmake" "
find_package(boost_throw_exception)
")

should be using find_dependency (from CMakeFindDependencyMacro). This is equivalent to find_package but is specifically for use in recursive calls inside configuration scripts.

pfultz2 commented 7 years ago

Yes, totally agree, this was a complete oversight.