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. QtCreator: Support for custom entries in CMAKE_CONFIGURATION_TYPES

QtCreator: Support for custom entries in CMAKE_CONFIGURATION_TYPES

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 384 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    thomas_braun
    wrote on last edited by
    #1

    Re: Qt Creator does not read build configurations

    I'm using latest QtCreator (12.0.2) and cmake with presets. I'm on Windows with MSVC 2022 but that should not matter.

    I would like to define custom entries in CMAKE_CONFIGURATION_TYPES like ABCD in

    {
      "version": 2,
      "configurePresets": [
        {
          "name": "msvc",
          "generator": "Visual Studio 17 2022",
          "architecture": "x64",
          "binaryDir": "${sourceDir}/build/msvc",
          "cacheVariables": {
            "CMAKE_CONFIGURATION_TYPES": "Debug;Release;ABCD"
          }
        }
      ]
    }
    

    With a MWE CMakeLists.txt a la

    cmake_minimum_required(VERSION 3.28)
    project(mytest CXX)
    
    add_executable(mytest main.cpp)
    

    and then loading that into QTCreator I get the msvc kit but only the Release and Debug variants are correctly added. The ABCD variant does not work.

    Is that supported? And if not, is there a workaround?

    I would like to avoiding having too many kits and instead want to leverage the build variants.

    cristian-adamC 1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
    • T thomas_braun

      Re: Qt Creator does not read build configurations

      I'm using latest QtCreator (12.0.2) and cmake with presets. I'm on Windows with MSVC 2022 but that should not matter.

      I would like to define custom entries in CMAKE_CONFIGURATION_TYPES like ABCD in

      {
        "version": 2,
        "configurePresets": [
          {
            "name": "msvc",
            "generator": "Visual Studio 17 2022",
            "architecture": "x64",
            "binaryDir": "${sourceDir}/build/msvc",
            "cacheVariables": {
              "CMAKE_CONFIGURATION_TYPES": "Debug;Release;ABCD"
            }
          }
        ]
      }
      

      With a MWE CMakeLists.txt a la

      cmake_minimum_required(VERSION 3.28)
      project(mytest CXX)
      
      add_executable(mytest main.cpp)
      

      and then loading that into QTCreator I get the msvc kit but only the Release and Debug variants are correctly added. The ABCD variant does not work.

      Is that supported? And if not, is there a workaround?

      I would like to avoiding having too many kits and instead want to leverage the build variants.

      cristian-adamC Online
      cristian-adamC Online
      cristian-adam
      wrote on last edited by
      #2

      Please open a bug report.

      Note that the number of build types will increase the generating time for all configurations. See https://gitlab.kitware.com/cmake/cmake/-/issues/25440 for more details.

      Qt Creator 13 comes with a "Presets Kits" only configuration page.

      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