Idk how to make it automaticly - the only option is to specify where the file is - not to generate it, but I don't wan't to write it by my own, because there are too many source files to include.
How to generate CMakeLists.txt in Clion when I create project from existing sources?
CLion can’t generate a CMakeLists.txt file for an existing project, it doesn’t know what to include and what not to, it doesn’t know what to link etc. –
Kremer
so maybe i can make some template, that would include all files in directory –
Sinew
Here are the steps that helped me:
- (Optional) If you have a
CMakeLists.txt
file in your project already but it's incomplete, delete it first. - Click on
Tools > CMake > Unload CMake Project
. - Open a source file, you will be presented with the option of selecting an existing
CMakeLists.txt
file or creating a new one. - Select create new. You will be presented with a list of files in your project which you can select/deselect for inclusion.
© 2022 - 2024 — McMap. All rights reserved.