I'm stuck on what seems like a rather simple problem. I've got this in my CMakeLists.txt
set(BOOST_INCLUDEDIR ${CMAKE_CURRENT_LIST_DIR}/boost_1_59_0) set(Boost_DEBUG 1) find_package(Boost 1.59.0 EXACT REQUIRED) The boost_1_59_0 I'm pointing it to contains the Boost source straight from the 1.59.0 release. I've tried both CMake 3.3.1 and 3.4.1. When I run CMake, I get the "Unable to find the Boost header files" error. Here's some of the debug output: -- [ FindBoost.cmake:551 ] _boost_TEST_VERSIONS = 1.59.0;1.59 -- [ FindBoost.cmake:553 ] Boost_USE_MULTITHREADED = TRUE -- [ FindBoost.cmake:555 ] Boost_USE_STATIC_LIBS = -- [ FindBoost.cmake:557 ] Boost_USE_STATIC_RUNTIME = -- [ FindBoost.cmake:559 ] Boost_ADDITIONAL_VERSIONS = -- [ FindBoost.cmake:561 ] Boost_NO_SYSTEM_PATHS = -- [ FindBoost.cmake:613 ] Declared as CMake or Environmental Variables: -- [ FindBoost.cmake:615 ] BOOST_ROOT = -- [ FindBoost.cmake:617 ] BOOST_INCLUDEDIR = /home/user/thirdparty/boost_1_59_0 -- [ FindBoost.cmake:619 ] BOOST_LIBRARYDIR = -- [ FindBoost.cmake:621 ] _boost_TEST_VERSIONS = 1.59.0;1.59 -- [ FindBoost.cmake:690 ] Include debugging info: -- [ FindBoost.cmake:692 ] _boost_INCLUDE_SEARCH_DIRS = /home/user/thirdparty/boost_1_59_0;PATHS;C:/boost/include;C:/boost;/sw/local/include -- [ FindBoost.cmake:694 ] _boost_PATH_SUFFIXES = boost-1_59_0;boost_1_59_0;boost/boost-1_59_0;boost/boost_1_59_0;boost-1_59;boost_1_59;boost/boost-1_59;boost/boost_1_59 So I see that the FindBoost module picked up my BOOST_INCLUDEDIR hint. I looked at the source for the FindBoost module, and it comes down to: find_path(NAMES boost/config.hpp ...). The file exists exactly where CMake says it's looking. $ ls -l /home/user/thirdparty/boost_1_59_0/boost/config.hpp -r--r--r-- 1 user user 2188 Nov 30 16:20 /home/user/thirdparty/boost_1_59_0/boost/config.hpp Yet CMake is still setting Boost_INCLUDE_DIR-NOTFOUND. I have tried removing boost_1_59_0 from my BOOST_INCLUDEDIR hint (since I saw that portion of the path in the suffixes, but it doesn't help). The only way I am able to get CMake to locate the boost headers is to install them into a global location like /usr/local/include (which I'd like to avoid).
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake