I need a simple example of how to enable boost libraries / headers with CMake in the Clion IDE under Windows 7. I
need this for C ++ 11.
Boost libs and headers are set in user directories.
I installed cygwin x64 for the compiler.
some solution:
i just included forward headers with cygdrive format
include_directories("/cygdrive/e/Libs/BoostLibs/include/boost-1_57")
But still don't understand where Clion gets lib files from.
The best solution is
to install var, BOOST_ROOT
so I did (and used more variables):
set(BOOST_ROOT "/cygdrive/e/Libs/BoostLibs/include/boost-1_57")
then you can find it and turn it on
FIND_PACKAGE(Boost REQUIRED)
IF (Boost_FOUND)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
ADD_DEFINITIONS( "-DHAS_BOOST" )
ENDIF()
source
share