Configure projects for running | Qt Creator Documentation

- Qt Creator Documentation
- Configure projects for running
- Qt Creator 15.0.0

How To

# Configure projects for running

Specify settings for running applications on the Run device that you select for a kit in Projects > Build & Run > Run > Run Settings.

The available build settings depend on the build system that you selected for the project and the device type:

- Android
- Boot to Qt
- Desktop
- Python
- QNX
- Remote Linux

## Manage run configurations

The available run configurations are listed in the Run configuration field. To add run configurations for a project, select Add. To add a run configuration that is based on the current one, select Clone.

To rename the current run configuration, select Rename.

To remove the current run configuration, select Remove.

### qmake run configurations

The run configurations for qmake projects derive their executable from the parsed .pro files. For more information on how the commands are constructed, see Start external processes.

## Select the default run target

If a project has multiple executables, you need to tell Qt Creator which one it should run.

### CMake run targets

When using CMake, you can filter the run target list by setting `qtc_runnable` as the value of the `FOLDER` property in the `CMakeLists.txt` file for the project. For example:

     set_target_properties(main_executable PROPERTIES FOLDER "qtc_runnable")

If you do not specify `qtc_runnable` for any project, Qt Creator automatically adds run configurations for all targets specified in `CMakeLists.txt`.

### qmake run targets

When using qmake, you can prevent Qt Creator from automatically creating run configurations for subprojects by specifying the `qtc_runnable` variable in the .pro files of the application projects (`TEMPLATE=app`) that you want to run. For example

     CONFIG += qtc_runnable

If none of your application projects specifies `qtc_runnable`, Qt Creator creates run configurations for all application projects.

If any of your application projects specifies `qtc_runnable`, Qt Creator creates run configurations only for subprojects that also have `CONFIG += qtc_runnable` set in their .pro files.

For more information about qmake project templates, see TEMPLATE.

### Meson run targets

Qt Creator automatically adds run configurations for all targets declared with `executable()` function in Meson build descriptions.

See also Enable debugging, Configuring Projects, Specify a custom executable to run, Specify Valgrind settings for a project, and Reference: Run Configurations.

How To