I used to open a CMake-based C++ project with QtCreator and pass my custom CMake command line parameters when configuring the project. In the recent versions of QtCreator (QtCre
Since QtCreator 4.13 it is possible to set CMake parameters per project (finally):
Project > Build Settings > CMake > Initial CMake parameters
@Manuel's answer is ideal for me when I have toolkit-specific CMake variables without project-specific variables.
When you have project-specific CMake variables, the options I have seen/used with recent QtCreator versions (~4+) are:
From QtCreator
Outside QtCreator
Sadly, I find both of these profoundly unsatisfying...
"Tools" > "Options" > "Build & Run" > "Your kit" > "CMake configuration"
Add a line and rebuild. You can go the short way Ctrl+5 (Projects mode) > "Manage Kits...", too.