<< September 2017 | Home | November 2017 >>

Eclipse CDT Indexer working with CMake & C++11

Finally started working on my nodetree-project. My IDE of choice is still eclipse although it makes one scream from time to time. Since my new project needs c++11 I do want the indexer to make it available for autocompletion. Well, but it does not out of the box. To make a long story short:

  • In CMake: Add to your CMakeLists.txt:
set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++0x)
  • In Eclipse: RightClick your project'->"C/C++ Include Paths and Symbols"->Change __cplusplus=1997... to __cplusplus=201103L

And the best thing, that define-change withstands a cmake-rebuild. At least it seems, so.

Tags : , ,

<< September 2017 | Home | November 2017 >>