configuration file for cmake?
-
I'm using Qt 6.2.3 with QtCreator 6.0.2
When I create a new project I get a minimal CMakeLists.txt file generated.
This contains the lines:
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)I have been looking for info on these settiings here, Stackoverflow, Cmake documentation etc. but nowhere can I find how to set or change the default value.
I know I can set this every time manually but I would like it to automatically have CMAKE_CXX_STANDARD 20 every time I create a new project.
I am following a course and therefore am creating lots of project files. It's no big deal to edit it manually but I am curious where the default value is stored. -
Hi @Colins2 ! I assume you're generating the project with Qt Creator?
The default version is currently hardcoded in the wizards. An easy way to change it is to edit the matching CMakeLists.txt file in the Qt Creator installation directory, e.g. on Windows typically under C:\Qt\Tools\QtCreator\share\qtcreator\templates\wizards\projects .