I was using Boost 1.54.0 and it was located in \"/usr/include\". We blew that away and installed Boost 1.57.0. It got installed in \"/usr/local/include\".
Now, my CLio
According to the FindBoost documentation (http://www.cmake.org/cmake/help/v3.1/module/FindBoost.html), you can set a CMake variable BOOST_ROOT
to give CMake a hint about where to look.
In your CMakeLists.txt file, you can add the following before the find_package(Boost...)
line:
set(BOOST_ROOT /usr/local)
Update: I agree with the comments that putting machine specific configuration parameters directly in CMakeLists.txt is not best practice.
As an alternative to directly setting this variable, you can pass options like this to the cmake process in CLion by doing the following:
Navigate to File -> Settings... -> Build, Execution, and Deployment -> CMake
. Under Generation
, add -DBOOST_ROOT=/usr/local
to CMake options
.