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.
Here are the steps that helped me:
CMakeLists.txt
file in your project already but it's incomplete, delete it first.Tools > CMake > Unload CMake Project
.CMakeLists.txt
file or creating a new one.