guhur
guhur

Reputation: 2856

CMake: can't find boost 1_60_0 (version.hp not found)

I am trying to compile a program using Boost with CMake under Mac OS X.

I have got the following error:

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindBoost.cmake:721 (file): file STRINGS file "/Users/.../src/boost_1_60_0/boost/boost/version.hpp" cannot be read. Call Stack (most recent call first): CMakeLists.txt:44 (find_package)

Boost version: 0.0.0

Indeed, when I go inside boost_1_60_0/boost, there isn't a folder called boost.

Is my FindBoost not up-to-date?

Upvotes: 5

Views: 6382

Answers (1)

Vtik
Vtik

Reputation: 3130

I beleive that you set your env wrong ! try to set entry BOOST_INCLUDE_DIR = "/Users/.../src/boost_1_60_0" It looks like you are getting it directly to /boost_1_60_0/boost which won't work as your CMAKE will look for the verion.hpp in BOOST_INCLUDE_DIR/boost/ folder.

BTW, are you sure that the version.hpp is not there ? that's strange !

Cheers

Upvotes: 5

Related Questions