CLion 2016.3 Help

Changing Configuration Types

When creating a run/debug configuration for your project in Run/Debug Configuration dialog box, you can choose one of the four default configuration types, provisioned by CMake:

  • Debug;
  • Release;
  • RelWithDebInfo;
  • MinSizeRel.

The desired Run/Debug configuration can be set from CMake settings dialog.

You can extend the list of available configuration types with your custom ones by setting them explicitly in CMakeLists.txt file.

To adjust the list of configuration types for a certain project, do the following:

  • in CMakeLists.txt file, specify CMAKE_CONFIGURATION_TYPES variable as in example below:
    cmake_minimum_required(VERSION 3.6) project(exampleProject) # variable CMAKE_CONGIGURATION_TYPES shall be defined prior to other definitions: set(CMAKE_CONFIGURATION_TYPES "CustomType1;CustomType2" CACHE STRING "" FORCE) # setting two custom # configuration types set(CMAKE_CXX_STANDARD 11) set(SOURCE_FILES main.cpp) add_executable(exampleProject ${SOURCE_FILES})

You can check the results in CMake Cache text file by pressing the /help/img/idea/icon_config.png button of CMake tool window.

See Also

Last modified: 22 November 2016