From 85f34d50fc114b746a668357ed0fbd9f58accba3 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 18 Aug 2021 13:49:48 +0200 Subject: [PATCH] Doc: Describe how to set default run target in CMakeLists.txt Task-number: QTCREATORBUG-25642 Change-Id: Idfeb2499e27e4b854a3c18e9b7d7c5dd53fc291b Reviewed-by: Cristian Adam --- .../creator-only/creator-projects-settings-run.qdoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc index 67d38202a9a..4235705623b 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -72,6 +72,17 @@ \QC automatically adds run configurations for all targets declared with \c {executable()} function in Meson build descriptions. + \section1 Selecting Default Run Target + + \QC has multiple executables, but when you run a project you typically want + to run \c qtcreator and not the first executable in the list. To filter the + run target list, set \c qtc_runnable as the value of the \c FOLDER property + in the \c {CMakeLists.txt} file for the project. For example: + + \badcode + set_target_properties(main_executable PROPERTIES FOLDER "qtc_runnable") + \endcode + \section1 Creating Run Configurations for Subprojects To prevent \QC from automatically creating run configurations for SUBDIRS