Need step-by-step guide to enable code navigation in CLion (Linux)

Answered

Does anyone know how to generate a CMakeLists.txt file that will cover all files in the opened Linux project and will fully enable Code navigation?  I have a code project with a ton of files and no CMakeLists.txt.  So I want to open the root directory and generate a CMakeLists.txt file that will index and enable source navigation of all the files in the root directory.

Note I'm interested in CLion 2020.3 for LINUX, a step-by-step guide.  I've seen examples for Windows and that isn't helping.

Thanks,

Jay

3 comments
Comment actions Permalink

I found this: https://www.jetbrains.com/help/clion/creating-new-project-from-scratch.html#import-prj which seems step-by-step but still doesn't give me  Create CMakeLists.txt dialog.

It would be nice to have a button that is "create project CMakeLists.txt at root" or "index project" which people understand better instead of trying to get this Create CMakeLists.txt dialog to popup.

0
Comment actions Permalink

this isi what is frustrating, when the documentation (first screenshot) isn't what I get on my CLION 2020.3 Linux setup:

0
Comment actions Permalink

Hello!

>when the documentation (first screenshot) isn't what I get on my CLION 2020.3 Linux setup

You compare different menus. The documentation contains the screenshot of `Tools | CMake` menu. And you captured the screenshot of the submenu of the CMake tool window - https://www.jetbrains.com/help/clion/cmake.html.

As for your question:

You need to close the project (File | Close project), delete the .idea subdirectory and the CMakeLists.txt file, on the Welcome screen choose Open and select the project folder (which doesn't contain .idea and CMakeLists.txt). When the project is opened, you need to select any file in the Project tool window and open it - and you will see a suggestion to create a CMakeLists.txt file.

0

Please sign in to leave a comment.