CLion supports Boost libraries. Resolve, navigation, completion and other code insight should work properly. You should configure CMakeLists.txt for finding Boost because CMake gets libraries. Try to use the following example:
set(BOOST_ROOT "/path_to_boost_1_57_0")
find_package(Boost 1.57.0)
if(NOT Boost_FOUND) message(FATAL_ERROR "Could not find boost!") endif()
To support all intelligent features which provides CLion, it uses a concept of a project and relies on CMake as a build system for it. All the includes paths, variables and more is taken from CMake files and are used by CLion to understand your project better and to resolve your code correctly.
It means that you should manually declare you source files, include directories and external dependencies for projects in CMakeLists.txt.
We are planning to improve UI for CMake project management, but since CMakeLists.txt has rich and flexible language which is impossible to analyze completely with static analysis, only a limited GUI management can be implemented.
I have figured out how to Include boost. Here is what to add to CMakLists.txt :The files may change depending on version and 32 or 64 bit, but adding this will do it. Credit goes to my TA Alvin Palley.
Hi!
CLion supports Boost libraries. Resolve, navigation, completion and other code insight should work properly.
You should configure CMakeLists.txt for finding Boost because CMake gets libraries.
Try to use the following example:
Thanks Anna. I am up and running now. Is there a way to have boost included in my cmakelists.txt by default?
Also if I create a new file in a project, that file is unuseable until I type in it's name in cmakelists.txt. Is there any way around this?
Thanks and have a good weekend.
Hi!
It means that you should manually declare you source files, include directories and external dependencies for projects in CMakeLists.txt.
We are planning to improve UI for CMake project management, but since CMakeLists.txt has rich and flexible language which is impossible to analyze completely with static analysis, only a limited GUI management can be implemented.
Important to mention this code right after endif()
I'm adding this to my CMakeLists.txt:
The resulting linking stage fails:
What can I do?
Thanks
I'm adding this to my CMakeLists.txt:
The resulting linking stage fails:
Hi all,
I have figured out how to Include boost. Here is what to add to CMakLists.txt :The files may change depending on version and 32 or 64 bit, but adding this will do it. Credit goes to my TA Alvin Palley.
Building on Udbhava3's solution, this is what worked in OSX