Indexing not finding basic C++ keywords after 2019.2 upgrade
I am just using Clion for code editing separate from the build system.
So I had addded the following lines to my CMakeList.txt:
include_directories(
/opt/poky/2.2.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include/
/opt/poky/2.2.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include/linux/
/opt/poky/2.2.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include/c++/6.2.0/
/opt/poky/2.2.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include/c++/6.2.0/arm-poky-linux-gnueabi/
/opt/poky/2.2.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/include/c++/6.2.0/tr1/
)
This doesn't seem to be enough for find basic C++ key words anymore after upgrading to CLion 2019.2
I tried to create another project from source and the problem is even worse with that not finding using and other very basic items.
Any ideas would be great.
请先登录再写评论。
There is still some odd going on with my main branch but I figure out what was specifically wrong with the new project.
I needed to add:
SET_SOURCE_FILES_PROPERTIES(${SOURCE_FILES} PROPERTIES LANGUAGE CXX)Hello!
CLion relies on project model to get all the information about the files included into the project, compilation flags, variables, etc. This information is used to parse/resolve the code correctly.
Currently, CLion supports CMake, compilation database and Gradle for C++. Also, there is a Google plugin for Bazel project model.
You need either to create a proper CMakeLists.txt for your project (here is the quick CMake tutorial - https://www.jetbrains.com/help/clion/quick-cmake-tutorial.html), or to use other project format supported by CLion (for example, generate a compilation database for your project ).