Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. configuration file for cmake?
Qt 6.11 is out! See what's new in the release blog

configuration file for cmake?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 713 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Colins2
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      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 .

      Director R&D, The Qt Company

      1 Reply Last reply
      3
      • C Offline
        C Offline
        Colins2
        wrote on last edited by Colins2
        #3

        Hi @kkoehne ,
        Many thanks! Yes, I have been creating the projects in QtCreator. I'm on Debian but the path is the same. I had been searching in every available cmake directory and hadn't got round to diving down the qtcreator tree.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved