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

/*!
    \page creator-build-settings-qbs.html
    \previouspage creator-reference.html

    \ingroup creator-reference-build-configurations

    \title Qbs Build Configuration

    \brief Settings for building applications with Qbs.

    To specify build settings for the selected \l{Managing kits}{kit}, go to
    \uicontrol Projects > \uicontrol {Build Settings}.

    \image {qtcreator-build-settings-qbs.webp} {Qbs build settings}

    Qbs builds projects in the directory that you specify in
    \uicontrol {Build directory}.

    In \uicontrol {Tooltip in target selector}, enter text
    to show as a tooltip when you hover over the build
    configuration in the \l{Build for many platforms}{kit selector}.

    You can enter a name for the build configuration in
    \uicontrol {Configuration name}.

    For more information about configuring Qbs, see \l{qbs-preferences}
    {Preferences: Qbs}.

    \include {creator-build-settings-qmake.qdoc} {qmake-qbs-common-settings}

    \section1 Qbs Build Steps

    \image {qtcreator-qbs-build-steps.webp} {Qbs build steps in Build Settings}

    To specify build steps for Qbs:

    \list 1

        \li In \uicontrol {Build variant}, select:
            \list
                \li \uicontrol Debug to include debug symbols in the build for
                    debugging the application.
                \li \uicontrol Profile for an optimized release build that is
                    delivered with separate debug information. It is best suited
                    for analyzing applications.
                \li \uicontrol Release to create the final installation binary
                    package.
            \endlist

        \li In \uicontrol {Parallel jobs}, specify the number of
            parallel jobs to use for building.

        \li In \uicontrol Properties, specify the properties to pass
            to the project. Use colons (:) to separate keys from values.
            For more information, see
            \l{http://doc.qt.io/qbs/language-introduction.html}{Qbs: Modules}.

        \li In \uicontrol Flags, select:

            \list

                \li \uicontrol {Keep going} to continue building when
                    errors occur, if possible.

                \li \uicontrol {Show command lines} to print actual
                    command lines to \l{Compile Output} instead of
                    high-level descriptions.

                \li \uicontrol {Force probes} to force re-execution of
                    the configure scripts of
                    \l{https://doc.qt.io/qbs/qbsprobes-qmlmodule.html}{QbProbes}.

            \endlist

        \li In \uicontrol {Installation flags}:

            \list

                \li Select \uicontrol Install to copy artifacts to their install
                    location after building them. This option is enabled by
                    default.

                    \note On Windows, the build will fail if the application
                    is running because the executable file cannot be
                    overwritten. To avoid this issue, you can clear this
                    checkbox and add a \uicontrol {Qbs Install} deployment step
                    in the run settings that will be performed just before
                    running the application.

                \li Select \uicontrol {Clean install root} to remove the
                    contents of the install root directory before the build
                    starts.

                \li Select \uicontrol {Use default location} to install the
                    artifacts to the default location. Clear the checkbox to
                    specify another location in
                    \uicontrol {Installation directory}.

            \endlist

    \endlist

    \uicontrol {Equivalent command line} displays the build command
    that is constructed based on the selected options.

    \section1 Qbs Clean Steps

    When building with Qbs, you can specify flags in \uicontrol {Clean Steps}:

    \image {creator-qbs-build-clean.png} {Qbs clean steps}

    \list

        \li Select \uicontrol {Dry run} to test cleaning without executing
            commands or making permanent changes to the build graph.

        \li Select \uicontrol {Keep going} to continue cleaning when errors
            occur, if possible.

    \endlist

    \uicontrol {Equivalent command line} displays the clean command
    that is constructed based on the selected options.

    \sa {qbs-build-system}{Build Systems: Qbs},
    {qbs-preferences}{Preferences: Qbs}, {Setting Up QML Debugging}
*/
