CLion 2016.1 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.

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.2.2) 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_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(SOURCE_FILES main.cpp) add_executable(exampleProject ${SOURCE_FILES})

You can check the results in CMake Cache tab of CMake tool window:

cl_varConfigurationTypes

See Also

Last modified: 20 July 2016