forked from qt-creator/qt-creator
Doc: Fix info about qtc_runnable for CMake and qmake
Combine the sections and fix misleading information. Task-number: QTCREATORBUG-26616 Change-Id: I6349d7f6d6765b8f76d391a48c232bf68ed124f6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -66,32 +66,49 @@
|
|||||||
parsed .pro files. For more information on how the commands are constructed,
|
parsed .pro files. For more information on how the commands are constructed,
|
||||||
see \l{Starting External Processes}.
|
see \l{Starting External Processes}.
|
||||||
|
|
||||||
\QC automatically adds run configurations for all targets specified in the
|
|
||||||
CMake project file, \c {CMakeLists.txt}.
|
|
||||||
|
|
||||||
\QC automatically adds run configurations for all targets declared with
|
|
||||||
\c {executable()} function in Meson build descriptions.
|
|
||||||
|
|
||||||
\section1 Selecting Default Run Target
|
\section1 Selecting Default Run Target
|
||||||
|
|
||||||
\QC has multiple executables, but when you run a project you typically want
|
If a project has multiple executables, you need to tell \QC which one it
|
||||||
to run \c qtcreator and not the first executable in the list. To filter the
|
should run.
|
||||||
run target list, set \c qtc_runnable as the value of the \c FOLDER property
|
|
||||||
|
\section2 CMake Run Targets
|
||||||
|
|
||||||
|
When using CMake, you can filter the run target list by setting
|
||||||
|
\c qtc_runnable as the value of the \c FOLDER property
|
||||||
in the \c {CMakeLists.txt} file for the project. For example:
|
in the \c {CMakeLists.txt} file for the project. For example:
|
||||||
|
|
||||||
\badcode
|
\badcode
|
||||||
set_target_properties(main_executable PROPERTIES FOLDER "qtc_runnable")
|
set_target_properties(main_executable PROPERTIES FOLDER "qtc_runnable")
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Creating Run Configurations for Subprojects
|
If you do not specify \c qtc_runnable for any project, \QC automatically
|
||||||
|
adds run configurations for all targets specified in \c {CMakeLists.txt}.
|
||||||
|
|
||||||
To prevent \QC from automatically creating run configurations for SUBDIRS
|
\section2 qmake Run Targets
|
||||||
projects, specify the following variable in the .pro file of the SUBDIRS
|
|
||||||
project: \c {CONFIG += qtc_runnable}.
|
|
||||||
|
|
||||||
|
When using qmake, you can prevent \QC from automatically creating run
|
||||||
|
configurations for subprojects by specifying the \c qtc_runnable
|
||||||
|
variable in the .pro files of the application projects (\c TEMPLATE=app)
|
||||||
|
that you want to run. For example
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
CONFIG += qtc_runnable
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
If none of your application projects specifies \c qtc_runnable, \QC creates
|
||||||
|
run configurations for all application projects.
|
||||||
|
|
||||||
|
If any of your application projects specifies \c qtc_runnable,
|
||||||
\QC creates run configurations only for subprojects that also have
|
\QC creates run configurations only for subprojects that also have
|
||||||
\c {CONFIG += qtc_runnable} set in their .pro files.
|
\c {CONFIG += qtc_runnable} set in their .pro files.
|
||||||
|
|
||||||
|
For more information about qmake project templates, see \l {TEMPLATE}.
|
||||||
|
|
||||||
|
\section2 Meson Run Targets
|
||||||
|
|
||||||
|
\QC automatically adds run configurations for all targets declared with
|
||||||
|
\c {executable()} function in Meson build descriptions.
|
||||||
|
|
||||||
\include creator-projects-settings-run-desktop.qdocinc run settings desktop
|
\include creator-projects-settings-run-desktop.qdocinc run settings desktop
|
||||||
\include creator-projects-settings-run-analyze.qdocinc settings valgrind
|
\include creator-projects-settings-run-analyze.qdocinc settings valgrind
|
||||||
\include creator-projects-settings-run-debug.qdocinc run settings debugger
|
\include creator-projects-settings-run-debug.qdocinc run settings debugger
|
||||||
|
|||||||
Reference in New Issue
Block a user