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.




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_Add is not properly supported in CLion for now - The thing is that ExternalProject_Add doesn'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 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_Add is not properly supported.


Please sign in to leave a comment.