// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!
    \page creator-building-targets.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-build

    \title Build for many platforms

    You can build applications for many target platforms, or using different
    compilers, debuggers or Qt versions. \l{Kits}
    define the tools, \l{glossary-device}{device} type, and other settings to use.

    By default, when you run the application, you
    automatically build and deploy it first.
    However, you can also perform each operation separately.

    To check that the application code can be compiled and linked for a device,
    build the project. You can see build errors and warnings in \l Issues and
    more details in \l {Compile Output}.

    \section1 Build an application

    To build an application:

    \list 1

        \li  Select the \uicontrol {Build and Run Kit Selector} icon or go to
             \uicontrol Build > \uicontrol {Open Build and Run Kit Selector} to
             select the build and run kit or an \l{Manage AVDs}{Android device}.

            \image qtcreator-kit-selector.webp {Kit selector}

        \li  Select \uicontrol Build > \uicontrol {Build Project} or press
             \key {Ctrl+B}.

             Or, select \inlineimage icons/run_small.png (\uicontrol Run) to
             deploy and run the application after building it.

    \endlist

    \section1 Cancel builds

    While the application is being built, the \inlineimage icons/build.png
    (\uicontrol Build) button changes to a \inlineimage icons/cancel-build.png
    (\uicontrol {Cancel Build}) button. To cancel the build:

    \list
        \li Select \inlineimage icons/cancel-build.png.
        \li Press \key {Alt+Backspace}.
        \li Go to \uicontrol Build > \uicontrol {Cancel Build}.
    \endlist

    If you selected a build command and now would also like to run the
    application, select the \uicontrol Run button to schedule running
    the project after building is done.

    \section1 Build projects in several configurations

    Go to \uicontrol Build to build, rebuild, and clean projects.

    To build the current project in all its configurations, that
    is, for all build configurations in all enabled kits, select
    \uicontrol {Build Project for All Configurations}.

    To build all open projects, select \uicontrol {Build All Projects}.
    If building one application fails, \QC displays an error message and
    continues building the other applications.

    To build all open projects in all their configurations, select
    \uicontrol {Build All Projects for All Configurations}.

    \section1 Build files or subprojects

    To quickly check the compile output for changes that you made in one file or
    subproject, use the \uicontrol Build menu commands to build it. The available
    build menu commands depend on the build system you selected for the project:
    CMake, qmake, or Qbs.

    Select \uicontrol {Build for Run Configuration} to
    build the executable that corresponds to the selected run configuration.
    You can also use the \c cm filter in the \l {Navigate with locator}
    {locator}.

    \section1 Remove build artifacts

    To remove all build artifacts, go to \uicontrol Build > \uicontrol {Clean}.

    To clean the build directory and then build the project, select
    \uicontrol {Rebuild}.

    To build and clean projects without dependencies, select the
    \uicontrol {Build Without Dependencies},
    \uicontrol {Rebuild Without Dependencies}, and
    \uicontrol {Clean Without Dependencies} options in the context menu in the
    \uicontrol Projects view.

    \sa {Configure projects for building}, {Build and Run}{How To: Build and Run},
    {Add Docker devices}, {Specifying Build Settings}
*/

/*!
    \page creator-how-to-run-qmake-before-building.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-build-with-qmake

    \title Run qmake before building

    To prevent failures on incremental builds, always run qmake before building,
    even though it takes more time. Go to \preferences > \uicontrol {Build & Run}
    > \uicontrol Qmake, and select \uicontrol {Run qmake on every build}.

    \image qtcreator-preferences-build-run-qmake.png {Build & Run Qmake Preferences}

    \sa {Build and Run}{How To: Build and Run}, {qmake Build Configuration}
*/
