FindBoost component math not working
I have a very simple use case of Boost's root finding algorithms as documented here: https://www.boost.org/doc/libs/1_69_0/libs/math/doc/html/math_toolkit/roots_deriv.html Basically, I only need the header #include <boost/math/tools/roots.hpp> in my code. I tried
find_package(Boost REQUIRED COMPONENTS math) and I got the error:
CMake Error at /usr/local/Cellar/cmake/3.13.4/share/cmake/Modules/FindBoost.cmake:2100 (message): Unable to find the requested Boost libraries. Boost version: 1.68.0 Boost include path: /usr/local/include Could not find the following Boost libraries: boost_math Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. Call Stack (most recent call first): CMakeLists.txt:5 (find_package)
FindBoost.cmake, maybe I should use something like
find_package(Boost REQUIRED COMPONENTS math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)? AFAIK, these are compiled libraries that I don't actually need. Is there a way of finding the header-only component of boost.math in cmake?