Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[QtCreator] Auto-competition not working for CMakeLists.txt
Hello, I can't get auto-completion for CMake functions with CMakeLists files, but it works for global variables.
I use QtCreator 4.3.0 .
Here are my kits :
Do you have that on a old or new project ?
Which version of cmake do you have installed ?
Thank you for your post.
I didn't have this problem with the QtCreator 4.0.3 and CMake 3.3.0.
I have trying to use CMake 3.3.0 on QtCreator 4.3.0, but it doesn't change anything.
To answer your question, yes, for each new installation of QtProject I start a new configuration (renaming the
"QtProject" folder in Appdata/Roaming to get backup) and I delete the configuration/cache files of the projects on which I work (cmake-caches-files and qtcreator-user-file).
Can you update your CMake version ?
I have just installed and configured my kits for CMake 3.8.2 and it still doesn’t allow for auto-completion of function names in CMake. Do you have the function names of CMake auto-completion (ex: target_incude_directories ...) ? This is work with QtCreator 4.0.3.
I would like to say again that, for every installation/change of version of QtCreator, I renew the configuration files, to have no problem (renaming/deleting the "QtProject" folder in Appdata/Roaming to get backup or not), and I remove the "CMakeCache" and the ".user" for any active projects of QtCreator.
I want to ask you, if you would not have any other problem with QtCreator 4.3.0 and CMake. Especially in the generation of projects? For example, when I modify the file CMakelists.txt, it was impossible for me to restart my project in "debug" mode with breakpoints (the program can't stop at breakpoints). It’s needs to do "Clear CMake Configuration".
And sometimes I get compilation errors with CMake, as soon as I modify the CMakeLists.txt file :
Error compiling / deploying project … (kit: …), When executing step "CMake Build "
I am therefore still obliged to do "Clear CMake Configuration", and this is painful on big project.
Again, I did not have problems with QtCreator version 4.0.3.
You may have found a regression.
You should take a look at the bug report system to see if there's anything related to that matter.
Thank you for your help.
I'm back to QtCreator 4.0.3 for now, waiting for the correction of these bugs ...