this file does not belong to any project target
已回答
Cannot implement code navigation. My project structure is as follows:
cmakelists.txt is in the build folder, and the source code is in the src folder.

The ExternalProject_Add function is used in the top level build/cmakelists.txt , resulting in no code navigation function.

What should I configure so that clion can have the code navigation function.
请先登录再写评论。
Hello!
First, when in CLion you open a folder which doesn't contain CMakeLists.txt, you need to select CMakeLists.txt in the Project tool window, right-click and select "Load CMake Project".
Secondly,
ExternalProject_Addis not properly supported in CLion for now - https://youtrack.jetbrains.com/issue/CPP-252. The thing is thatExternalProject_Adddoesn't provide any information about the project which it loads - we can't even get the information about the source files of the external project. Feel free to comment or upvote the issue in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.Even if I use local code in
ExternalProject_Add.Clion also does not support the code navigation.Thank you!Yes, that's the case now, because
ExternalProject_Addis not properly supported.