I installed boost through:

sudo apt-get install libboost-all-dev

Now I need to set BOOST_ROOT for cmake to be able to find Boost library. Where should this path be set to?


Actually, you do not need to set BOOST_ROOT. CMake can find Boost in its standard location. It worked for me on Ubuntu 12.04 LTS, with CMake version 2.8.7 and Boost 1.46.

Theoretically, BOOST_ROOT should be set to /usr if for some reason the above won't work.

Should you have a problem, then add -DBoost_DETAILED_FAILURE_MSG=TRUE to the cmake invocation (note the spelling!). This will print some moderately helpful error messages.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.