/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qbs.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \contentspage index.html
    \qmltype cpp
    \inqmlmodule QbsModules
    \since Qbs 1.0

    \brief Provides C/C++ support.

    The \c cpp module contains the properties and rules for toolchains of the C/C++ family.
    On Apple platforms, this includes support for Objective-C/C++.

    \section2 Setting Up the Run Environment

    When running an application that has dependencies on dynamic libraries, the
    script specified by \l{Module::setupRunEnvironment}{Module.setupRunEnvironment}
    automatically adds the locations of the libraries to the environment.
    That is, to \c PATH on Windows, \c DYLD_LIBRARY_PATH on macOS,
    and \c LD_LIBRARY_PATH on Linux and other Unix platforms. If the value
    \c{"ignore-lib-dependencies"} shows up in the \c config array, this behavior
    is disabled. Users can set the value via the \l run command.

    \target dependency-parameters-cpp
    \section2 Dependency Parameters

    \table
    \header
        \li Parameter
        \li Type
        \li Since
        \li Default
        \li Description
    \row
        \li \c{link}
        \li \c{bool}
        \li 1.9
        \li undefined
        \li If \c{false}, the dependency will not be linked, even if
            it is a valid input for a linker rule. This property
            affects library dependencies only.
    \row
        \li \c{linkWholeArchive}
        \li \c{bool}
        \li 1.9
        \li undefined
        \li If \c{true}, then if the dependency is a static library, all of its objects
            will be pulled into target binary, even if their symbols do not appear to be used.
            This parameter is mainly useful when creating a dynamic library from static libraries.
    \row
        \li \c{symbolLinkMode}
        \li \c{string}
        \li 1.9
        \li undefined
        \li Attribute specifying how the library or framework will be linked.
            May contain the values: "weak", "lazy", "reexport", and "upward"; refer to the Apple
            ld64 man page for full details. \c{undefined} uses normal linking.
            Currently only applies when linking for Apple platforms.
    \endtable

    \section2 Relevant File Tags
    \target filetags-cpp

    \table
    \header
        \li Tag
        \li Auto-tagged File Names
        \li Since
        \li Description
    \row
        \li \c{"application"}
        \li n/a
        \li 1.0.1
        \li The rule that creates executable files (typically via a linker) attaches this tag
            to its output artifact.
    \row
        \li \c{"asm"}
        \li \c{*.s} (for GCC-like toolchains), \c{*.asm} (for MSVC)
        \li 1.1.0
        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
            assembler. One object file is generated for each such file.
    \row
        \li \c{"asm_cpp"}
        \li \c{*.S}, \c{*.sx}
        \li 1.1.0
        \li Like \c{"asm"}, but for source files that need preprocessing. This tag only has an
            effect with GCC-like toolchains.
    \row
        \li \c{"c"}
        \li \c{*.c} (if \c combineCSources is not enabled)
        \li 1.0.1
        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
            C compiler. One object file is generated for each such file.
    \row
        \li \c{"c.combine"}
        \li \c{*.c} (if \c combineCSources is enabled)
        \li 1.8
        \li Source files with this tag serve as inputs to a rule combining them into
            a single C file, which will then be compiled.
    \row
        \li \c{"cpp"}
        \li \c{*.C}, \c{*.cpp}, \c{*.cxx}, \c{*.c++}, \c{*.cc}
            (if \c combineCxxSources is not enabled)
        \li 1.0.1
        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
            C++ compiler. One object file is generated for each such file.
    \row
        \li \c{"cpp.combine"}
        \li \c{*.C}, \c{*.cpp}, \c{*.cxx}, \c{*.c++}, \c{*.cc}
            (if \c combineCxxSources is enabled)
        \li 1.8
        \li Source files with this tag serve as inputs to a rule combining them into
            a single C++ file, which will then be compiled.
    \row
        \li \c{"c_pch_src"}, \c{"cpp_pch_src"}, \c{"objc_pch_src"}, \c{"objcpp_pch_src"}
        \li -
        \li 1.5
        \li Files with this tag will be turned into precompiled headers for C, C++, Objective-C
            and Objective-C++, respectively. There can be only one such file per product and
            language.
    \row
        \li \c{"dynamiclibrary"}
        \li n/a
        \li 1.0.1
        \li The rule that creates dynamic libraries (typically via a linker) attaches this tag
            to its output artifact.
    \row
        \li \c{"hpp"}
        \li \c{*.h}, \c{*.H}, \c{*.hpp}, \c{*.hxx}, \c{*.h++}
        \li 1.0.1
        \li This tag is used for header files (C, C++, Objective-C and Objective-C++). No rule
            in this module generates output artifacts from such files directly, but the compiler
            rule will have a dependency on all rules that create such files.
    \row
        \li \c{"linkerscript"}
        \li -
        \li 1.5.0
        \li This tag is used for \c ld linker scripts. You can provide such a file if you need
            to replace the default linker script.
            This file tag only has an effect with GCC-like toolchains. The linker needs to be
            \c{ld}-compatible.
    \row
        \li \c{"obj"}
        \li n/a
        \li 1.0.1
        \li The rule that creates object files (typically via a compiler) attaches this tag
            to its output artifacts. Such files are usually intermediate artifacts of the build
            process and rarely need to be referenced in project files.
    \row
        \li \c{"objc"}
        \li \c{*.m} (if \c combineObjcSources is not enabled)
        \li 1.1.0
        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
            Objective-C compiler. One object file is generated for each such file.
    \row
        \li \c{"objc.combine"}
        \li \c{*.m} (if \c combineObjcSources is enabled)
        \li 1.8
        \li Source files with this tag serve as inputs to a rule combining them into
            a single Objective-C file, which will then be compiled.
    \row
        \li \c{"objcpp"}
        \li \c{*.mm} (if \c combineObjcxxSources is not enabled)
        \li 1.1.0
        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
            Objective-C++ compiler. One object file is generated for each such file.
    \row
        \li \c{"objcpp.combine"}
        \li \c{*.mm} (if \c combineObjcxxSources is enabled)
        \li 1.8
        \li Source files with this tag serve as inputs to a rule combining them into
            a single Objective-C++ file, which will then be compiled.
    \row
        \li \c{"rc"}
        \li \c{*.rc}
        \li 1.1.0
        \li Files with this tag serve as inputs to the Windows resource compiler. One object file
            is generated for each such file. The tag has no effect on target platforms other than
            Windows.
    \row
        \li \c{"staticlibrary"}
        \li n/a
        \li 1.0.1
        \li The rule that creates static libraries (typically via a linker) attaches this tag
            to its output artifact.
    \row
        \li \c{"versionscript"}
        \li -
        \li 1.5.0
        \li This tag is used for \c ld linker scripts. You can provide such a file if you need
            fine-grained control over the symbols present in a shared library.
            This file tag only has an effect with GCC-like toolchains. The linker needs to be
            \c{ld}-compatible.
    \endtable
*/

/*!
    \qmlproperty bool cpp::allowUnresolvedSymbols
    \since Qbs 1.2

    Set to \c true if you want the linking step to succeed even if the resulting
    binary contains unresolved symbols. Normally, this makes little sense, but
    in special cases it is possible that the respective symbols will be
    available at load time even if they are not present during linking.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::architecture

    The target architecture.

    \defaultvalue \l{qbs::architecture}{qbs.architecture}
*/

/*!
    \qmlproperty string cpp::endianness
    \since Qbs 1.9

    Specifies the endianness of the target platform's processor architecture
    (\c{"big"} or \c{"little"}).

    The value is automatically detected from the compiler's default values, but
    can also be manually set in order to select a specific endianness when
    targeting bi-endian architectures like MIPS and PowerPC.

    \defaultvalue Compiler default value.
*/

/*!
    \qmlproperty bool cpp::debugInformation

    Whether to generate debug information.

    \defaultvalue \l{qbs::debugInformation}{qbs.debugInformation}
*/

/*!
    \qmlproperty bool cpp::combineCSources
    \since Qbs 1.8

    Enabling this property on a \l{Product}{product} instructs the
    \l{FileTagger}{file tagger} to attach the tag \c{"c.combine"} to C sources,
    rather than \c{"c"}. As a result, all C sources of the product will be
    combined into a single file, which is then compiled.

    This can speed up initial compilation significantly, but is of course
    detrimental in the context of incremental builds. Also, perfectly legal code
    may fail to compile with this option due to the merging of translation
    units.

    To enable this property in a product that has sources that cannot be merged,
    put the sources into a dedicated \l{Group} and set their \l{Group::}
    {fileTags} property to \c{"c"}, overriding the file tagger.

    \note Module properties set on specific source files (that is, at the Group
    level) will not be taken into account when building the combined file. You
    either need to set these properties at the product level or prevent the
    respective files from getting combined via the mechanism described above.

    \defaultvalue \c false
*/

/*!
    \qmlproperty bool cpp::combineCxxSources
    \since Qbs 1.8

    Like \l{cpp::}{combineCSources}, but for C++. The \l{filetags-cpp}
    {relevant file tags} are \c{"cpp"} and \c{"cpp.combine"}.

    \defaultvalue \c false

    \sa combineCSources
*/

/*!
    \qmlproperty bool cpp::combineObjcSources
    \since Qbs 1.8

    Like \l{cpp::}{combineCSources}, but for Objective-C. The \l{filetags-cpp}
    {relevant file tags} are \c{"objc"} and \c{"objc.combine"}.

    \defaultvalue \c false

    \sa combineCSources
*/

/*!
    \qmlproperty bool cpp::combineObjcxxSources
    \since Qbs 1.8

    Like \l{cpp::}{combineCSources}, but for Objective-C++. The \l{filetags-cpp}
    {relevant file tags} are \c{"objcpp"} and \c{"objcpp.combine"}.

    \defaultvalue \c false

    \sa combineCSources
*/

/*!
    \qmlproperty bool cpp::discardUnusedData
    \since Qbs 1.10

    If this property is \c true, the linker will discard data from objects that
    it determines to be unused. With MSVC and on Apple platforms, the
    granularity is per symbol, elsewhere it is per section.

    \nodefaultvalue
*/

/*!
    \qmlproperty bool cpp::separateDebugInformation
    \since Qbs 1.4

    Whether to store debug information in an external file or bundle instead of
    within the binary.

    The type of files that will be generated when this property is \c{true} is
    dependent on the compiler and target platform:

    \list
        \li With MSVC, this property controls the generation of
            \c{.pdb} (Program Debug Database) files.
        \li On Apple platforms with GCC or Clang, this property controls the
            generation of \c{.dSYM} (DWARF Symbol) bundles or, if
            \l{cpp::}{dsymutilFlags} contains the \c{-f} or \c{--flat} flags,
            \c{.dwarf} symbol files.
        \li On other platforms with GCC or Clang (including Windows/MinGW), this
            property controls the generation of \c{.debug} symbol files.
    \endlist

    \defaultvalue \c{true} for MSVC and with GCC or Clang on Apple platforms,
    otherwise \c{false}.
*/

/*!
    \qmlproperty stringList cpp::defines

    A list of preprocessor macros that gets passed to the compiler.

    To set macro values, use the following syntax:

    \code
    cpp.defines: ["USE_COLORS=1", 'COLOR_STR="blanched almond"']
    \endcode

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::platformDefines

    A list of preprocessor macros that are used for all projects that are built
    for the current target platform. User project files usually do not set this
    property.

    \nodefaultvalue
*/

/*!
    \qmlproperty pathList cpp::includePaths

    A list of include paths.

    Relative paths are considered to be relative to the \c .qbs product file
    they are used in.

    \nodefaultvalue
*/

/*!
    \qmlproperty pathList cpp::systemIncludePaths

    A list of include paths that are passed as system include paths to the
    compiler.

    For header files in those paths, warnings will be ignored.

    Relative paths are considered to be relative to the \c .qbs product file
    they are used in.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::systemRunPaths
    \since Qbs 1.6

    The paths the dynamic linker uses on process start-up to locate dynamic
    libraries.

    \defaultvalue Auto-detected for host builds on Linux via \c ldconfig,
    \c{["/lib", "/usr/lib"]} otherwise on Unix, \c [] on Windows.
*/

/*!
    \qmlproperty pathList cpp::libraryPaths

    A list of library search paths.

    Relative paths are considered to be relative to the \c .qbs product file
    they are used in.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::dynamicLibraries

    A List of dynamic libraries to be linked.

    If the library is part of your project, consider using a \l{Depends} item
    instead.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::staticLibraries

    A list of static libraries to be linked.

    If the library is part of your project, consider using a \l{Depends} item
    instead.

    \nodefaultvalue
*/

/*!
    \qmlproperty pathList cpp::prefixHeaders
    \since Qbs 1.0.1

    A list of files to automatically include at the beginning of each source
    file in the \l{Product}{product}.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::optimization

    The optimization level.

    \defaultvalue \l{qbs::optimization}{qbs.optimization}
*/

/*!
    \qmlproperty bool cpp::treatWarningsAsErrors

    Whether warnings will be handled as errors and cause the build to fail.

    \defaultvalue \c{false}
*/

/*!
    \qmlproperty bool cpp::useCPrecompiledHeader
    \since Qbs 1.5

    Whether to use a precompiled header for compiling C sources if one is
    present.

    Set this property to \c false in a \l Group item to disable precompiled
    headers for some sources even though a precompiled header is present in the
    product.

    See \l{filetags-cpp}{Relevant File Tags} for the associated file tags.

    \defaultvalue \c true
*/

/*!
    \qmlproperty bool cpp::useCxxPrecompiledHeader
    \since Qbs 1.5

    Like \l useCPrecompiledHeader, but for C++.

    \defaultvalue \c true
*/

/*!
    \qmlproperty bool cpp::useObjcPrecompiledHeader
    \since Qbs 1.5

    Like \l useCPrecompiledHeader, but for Objective-C.

    \defaultvalue \c true
*/

/*!
    \qmlproperty bool cpp::useObjcxxPrecompiledHeader
    \since Qbs 1.5

    Like \l useCPrecompiledHeader, but for Objective-C++.

    \defaultvalue \c true
*/

/*!
    \qmlproperty string cpp::warningLevel

    The warning level for the compiler: \c{"none"} or \c{"all"}.

    \defaultvalue \c{"all"}
*/

/*!
    \qmlproperty stringList cpp::driverFlags
    \since Qbs 1.6

    A list of flags that are added to all compilation and linking commands
    performed by the compiler driver, independently of the language.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::driverLinkerFlags
    \since Qbs 1.11

    A list of flags that are added to all linking commands performed by the
    compiler driver, independently of the language.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::commonCompilerFlags
    \since Qbs 1.0.1

    A list of flags that are added to all compilation commands independently of
    the language.

    \nodefaultvalue
*/

/*!
    \qmlproperty int cpp::compilerVersionMajor
    \since Qbs 1.4

    The major version of the compiler.

    \nodefaultvalue
*/

/*!
    \qmlproperty int cpp::compilerVersionMinor
    \since Qbs 1.4

    The minor version of the compiler.

    \nodefaultvalue
*/

/*!
    \qmlproperty int cpp::compilerVersionPatch
    \since Qbs 1.4

    The patch level component of the compiler version.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::assemblerFlags
    \since Qbs 1.5

    A list of additional flags for the assembler.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::cppFlags

    A list of additional flags for the C preprocessor.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::cFlags

    A list of additional flags for the C compiler.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::cxxFlags

    A list of additional flags for the C++ compiler.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::cLanguageVersion
    \since Qbs 1.4

    The version of the C standard with which the code must comply.

    If this property is set, the corresponding compiler and linker flags will be
    added, depending on the toolchain.

    If the value is left undefined, the compiler default will be used.

    Possible values include: \c{"c89"}, \c{"c99"}, \c{"c11"}.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::cxxLanguageVersion
    \since Qbs 1.4

    The version of the C++ standard with which the code must comply.

    If this property is set, the corresponding compiler and linker flags will be
    added, depending on the toolchain.

    If the value is left undefined, the compiler default will be used.

    Possible values include: \c{"c++98"}, \c{"c++11"}, \c{"c++14"}, \c{"c++17"}.

    \nodefaultvalue
*/

/*!
    \qmlproperty bool cpp::useLanguageVersionFallback
    \since Qbs 1.11

    Whether to explicitly use the language standard version fallback values in
    compiler command line invocations.

    By default, \QBS will automatically substitute fallback values for the C and
    C++ language standard versions specified by the \l cLanguageVersion and
    \l cxxLanguageVersion properties, which are passed to the \c{-std=} compiler
    command line option with GNU-compatible toolchains, if it detects that you
    are using an older toolchain which does not support the standard values. The
    substitutions are made as follows:

    \table
    \header
        \li Value
        \li Substitute
    \row
        \li c++11
        \li c++0x
    \row
        \li c11
        \li c1x
    \row
        \li c++14
        \li c++1y
    \row
        \li c++17
        \li c++1z
    \endtable

    If this property is explicitly set to \c true, \QBS will always use the
    fallback values.

    If this property is explicitly set to \c false, \QBS will never use the
    fallback values.

    This property has no effect with the Microsoft Visual C++ compiler.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::cxxStandardLibrary
    \since Qbs 1.4

    The C++ standard library to link to.

    If this property is set, the corresponding compiler and linker flags will be
    added, assuming the value is valid for the current toolchain.

    If the value is left undefined, the compiler default will be used.

    Possible values include: \c{"libstdc++"}, \c{"libc++"}.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::objcFlags

    A list of additional flags for the Objective-C compiler.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::objcxxFlags

    A list of additional flags for the Objective-C++ compiler.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::linkerFlags

    A list of additional flags for the linker.

    These flags should \e not be escaped using the \c -Wl or \c -Xlinker
    syntaxes, as \QBS will do this automatically based on the linker being used.

    \sa linkerMode

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::assemblerName
    \since Qbs 1.5

    The name of the assembler binary. This property is set in the build profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty string cpp::assemblerPath
    \since Qbs 1.5

    The full path of the assembler binary. This property is set in the build
    profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty string cpp::compilerName

    The name of the main compiler binary. This property is set in the build profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty string cpp::compilerPath

    The full path of the main compiler binary. This property is set in the build profile.

    If the toolchain provides different compilers for different languages,
    \l{cpp::}{compilerPathByLanguage} is used.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty var cpp::compilerPathByLanguage
    \since Qbs 1.3

    A \c{string} to \c{string} map that maps file tags to full paths of compiler
    binaries. This property is set in the build profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty stringList cpp::compilerWrapper
    \since Qbs 1.1

    A wrapper binary and its arguments for wrapping compiler calls.
    This is useful for compiler wrappers, such as \c ccache.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::linkerName
    \since Qbs 1.1.1

    The name of the linker binary. This property is set in the build profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty string cpp::linkerPath
    \since Qbs 1.1.1

    The full path of the linker binary. This property is set in the build profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty stringList cpp::linkerWrapper
    \since Qbs 1.6.2

    A wrapper binary and its arguments for wrapping linker calls.
    This is useful for linker wrappers as needed by Bullseye Coverage, for
    example.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::entryPoint
    \since Qbs 1.3

    The name of the entry point of an executable or dynamic library.

    If this property is left undefined, the toolchain's default is used.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::runtimeLibrary
    \since Qbs 1.3.3

    The type of the runtime library used.

    Accepted values are \c{"static"} and \c{"dynamic"}.

    If this property is set to \c{undefined}, the default runtime library of the
    toolchain is used.

    \note This property is only functional for MSVC.

    \defaultvalue \c{"dynamic"} for MSVC, \c{undefined} for other compilers.
*/

/*!
    \qmlproperty bool cpp::enableExceptions
    \since Qbs 1.5

    Whether to enable exceptions in C++ code.

    \defaultvalue \c{true}
*/

/*!
    \qmlproperty string cpp::exceptionHandlingModel
    \since Qbs 1.5

    The exception handling model to use.

    For MSVC, this can be \c{"default"}, \c{"seh"} or \c{"externc"}. For all
    other compilers, \c{"default"} indicates the default or the only exception
    handling model.

    \defaultvalue \c{"default"}
*/

/*!
    \qmlproperty bool cpp::enableRtti
    \since Qbs 1.5

    Whether to enable runtime type information in C++ code.

    \nodefaultvalue
*/

/*!
    \qmlproperty bool cpp::enableReproducibleBuilds
    \since Qbs 1.5

    Whether the compiler should try to generate reproducible object files.

    Some compilers (notably GCC) use random numbers for generating symbol names
    that have to be different in every compilation unit. This is avoided by
    setting this property to \c{true}.

    \defaultvalue \c{false}
*/

/*!
    \qmlproperty bool cpp::treatSystemHeadersAsDependencies
    \since Qbs 1.8

    Whether included header files found via \l{cpp::}{systemIncludePaths},
    \l{cpp::}{distributionIncludePaths}, or \l{cpp::}{compilerIncludePaths}
    will be added to the dependencies of the respective object file.

    This means that modification of such header files (or any of the headers
    they include) will cause recompilation.

    \defaultvalue \c{false}
*/

/*!
    \qmlproperty stringList cpp::dsymutilFlags
    \since Qbs 1.4.1

    \appleproperty

    Additional flags for the \c dsymutil tool.

    \note If this property contains the \c{-f} or \c{--flat} options, this will
    cause \QBS to generate "flat" (single-file) \c{.dwarf} debug symbol files
    instead of \c{.dSYM} bundles (directories) when
    \l{cpp::}{separateDebugInformation} is set to \c{true}.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::dsymutilPath
    \since Qbs 1.4

    \appleproperty

    The full path of the \c dsymutil binary. This property is set in the build
    profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty string cpp::lipoPath
    \since Qbs 1.9

    \appleproperty

    The full path of the \c lipo binary.

    \defaultvalue Determined automatically.
*/

/*!
    \qmlproperty pathList cpp::frameworkPaths

    \appleproperty

    A list of framework search paths.

    Relative paths are considered to be relative to the \c .qbs product file
    they are used in.

    \nodefaultvalue
*/

/*!
    \qmlproperty pathList cpp::systemFrameworkPaths

    \appleproperty

    A list of framework search paths.

    Relative paths are considered to be relative to the \c .qbs product file
    they are used in. Header files in frameworks in those paths will not cause
    warnings.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::frameworks

    \appleproperty

    A list of frameworks to be linked.

    If the framework is part of your project, consider using a \l{Depends} item
    instead.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::weakFrameworks

    \appleproperty

    A list of frameworks to be weakly linked.

    If the framework is part of your project, consider using a \l{Depends} item
    instead.

    \nodefaultvalue
*/

/*!
    \qmlproperty bool cpp::automaticReferenceCounting
    \since Qbs 1.4

    \appleproperty

    Whether to enable Automatic Reference Counting (ARC) for Objective-C and
    Objective-C++ source code.

    If left undefined, uses the compiler default (probably \c{false}).

    \nodefaultvalue
*/

/*!
    \qmlproperty bool cpp::requireAppExtensionSafeApi
    \since Qbs 1.4

    \appleproperty

    Whether to enforce the use of only app-extension-safe APIs on Apple
    platforms. This is necessary for building Application Extensions in OS X
    Yosemite and iOS 8 and above.

    If left undefined, uses the compiler and linker defaults (probably
    \c{false}).

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::minimumIosVersion

    \appleproperty

    A version number in the format \c{[major].[minor]} indicating the earliest
    version of iOS that the product should run on.

    Passes \c{-miphoneos-version-min=<version>} to the compiler.

    If left undefined, compiler defaults will be used.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::minimumOsxVersion
    \obsolete

    \appleproperty

    Deprecated in \QBS 1.5.2. Use \l{cpp::minimumMacosVersion} instead.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::minimumMacosVersion
    \since Qbs 1.5.2

    \appleproperty

    A version number in the format \c{[major].[minor]}indicating the earliest
    version of macOS that the product should run on.

    Passes \c{-mmacosx-version-min=<version>} to the compiler.

    If left undefined, compiler defaults will be used.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::minimumWatchosVersion

    \appleproperty

    A version number in the format \c{[major].[minor]} indicating the earliest
    version of Apple watchOS that the product should run on.

    If left undefined, compiler defaults will be used.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::minimumTvosVersion
    \since Qbs 1.5

    \appleproperty

    A version number in the format \c{[major].[minor]} indicating the earliest
    version of Apple tvOS that the product should run on.

    If left undefined, compiler defaults will be used.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::archiverName

    \unixproperty

    The name of the archiver binary. This property is set in the build profile.

    \defaultvalue \c{"ar"}
*/

/*!
    \qmlproperty string cpp::archiverPath

    \unixproperty

    The full path of the archiver binary. This property is set in the build
    profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty string cpp::exportedSymbolsCheckMode
    \since Qbs 1.4.1

    \unixproperty

    Controls how \QBS determines whether an updated dynamic library causes
    relinking of dependents.

    The default value is \c "ignore-undefined", which means that undefined
    symbols being added or removed do not cause any relinking. If that should
    happen, for example because dependent products are linked with an option
    such as \c "--no-undefined", this property can be set to \c "strict".

    \defaultvalue \c "ignore-undefined"
*/

/*!
    \qmlproperty string cpp::linkerMode
    \since Qbs 1.6

    \unixproperty

    Controls whether to automatically use an appropriate compiler frontend
    instead of the system linker when linking binaries.

    The default is \c{"automatic"}, which chooses either the C++ compiler, C
    compiler, or system linker specified by the \l{cpp::}{linkerName} and
    \l{cpp::}{linkerPath} properties, depending on the type of object files
    present on the linker command line.

    Set this property to \c{"manual"} to explicitly specify the linker using the
    \l{cpp::}{linkerName} and \l{cpp::}{linkerPath} properties.

    \defaultvalue \c "automatic"
*/

/*!
    \qmlproperty string cpp::nmName
    \since Qbs 1.2

    \unixproperty

    The name of the \c nm binary. This property is set in the build profile.

    \defaultvalue \c{"nm"}
*/

/*!
    \qmlproperty string cpp::nmPath
    \since Qbs 1.2

    \unixproperty

    The full path of the \c nm binary. This property is set in the build
    profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty string cpp::objcopyName
    \since Qbs 1.4

    \unixproperty

    The name of the \c objcopy binary. This property is set in the build
    profile.

    \defaultvalue \c{"objcopy"}
*/

/*!
    \qmlproperty string cpp::objcopyPath
    \since Qbs 1.4

    \unixproperty

    The full path of the \c objcopy binary. This property is set in the build
    profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty string cpp::stripName
    \since Qbs 1.4

    \unixproperty

    The name of the \c strip binary. This property is set in the build profile.

    \defaultvalue \c{"strip"}
*/

/*!
    \qmlproperty string cpp::stripPath
    \since Qbs 1.4

    \unixproperty

    The full path of the \c strip binary. This property is set in the build
    profile.

    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
*/

/*!
    \qmlproperty bool cpp::positionIndependentCode

    \unixproperty

    Whether to generate position-independent code.

    If this property is left undefined, position-independent code is generated
    for libraries, but not for applications.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::rpathOrigin
    \since Qbs 1.11

    \unixproperty

    A placeholder value used in an \c rpath string to refer to the directory
    containing the referring executable or shared library.

    \defaultvalue \c{"@loader_path"} on Mach-O based platforms (macOS, iOS,
    tvOS, watchOS); \c{"$ORIGIN"} on ELF based platforms (Linux and most other
    Unix-like platforms).
*/

/*!
    \qmlproperty stringList cpp::rpaths

    \unixproperty

    A list of \c rpaths that are passed to the linker. Paths that also appear in
    \l{cpp::}{systemRunPaths} are ignored.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::sonamePrefix
    \since Qbs 1.5

    \unixproperty

    A library name or full library path.

    If defined, the value of this property is used as a path to be prepended to
    the built shared library's \c SONAME identifier. The \c SONAME
    (\c LC_ID_DYLIB on Apple platforms, \c DT_SONAME on other Unix-like
    platforms) is the identifier that the dynamic linker will later use to
    reference the library.

    On Apple platforms, the path may contain the following placeholders:

    \list
        \li \c @rpath -
            Expands to paths defined by \c LC_RPATH Mach-O commands in
            the current process executable or the referring libraries.
        \li \c @executable_path -
            Expands to the current process executable location.
        \li \c @loader_path -
            Expands to the referring executable or library location.
    \endlist

    In most cases, using \c @rpath is sufficient and recommended.
    However, the prefix may be also specified using different placeholders, or
    an absolute path.

    For more information, see the \l{DYLD documentation} on dynamic library
    install names.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::soVersion
    \since Qbs 1.7

    \unixproperty

    The version number to be appended to the soname in ELF shared libraries.

    \defaultvalue The major part of \l{Product::version}{product.version} if a
    version is set, otherwise \c [].
*/

/*!
    \qmlproperty bool cpp::useRPaths
    \since Qbs 1.3

    \unixproperty

    If \c{false}, prevents the linker from writing \c rpaths to the binary.

    \defaultvalue \c{true}
*/

/*!
    \qmlproperty bool cpp::useRPathLink
    \since Qbs 1.8

    \unixproperty

    Whether to use the \c{-rpath-link} linker option for transitive shared
    objects.

    \defaultvalue \c{true} on non-Darwin Unix platforms or when targeting
    macOS 10.4.x and older.
*/

/*!
    \qmlproperty string cpp::variantSuffix
    \since Qbs 1.10

    A suffix to add to a product's target name if that product is of the
    \l{Product::type}{type} \c staticlibrary or \c dynamiclibrary.

    On Darwin platforms, applications and loadable modules are also affected.

    By default, this property is left empty on all platforms unless the product
    is multiplexed over the \l{qbs::buildVariants}{qbs.buildVariants} property.
    In that case, for the debug variant of the product, the default value
    is \c{"d"} on Windows and \c{"_debug"} on Darwin platforms, such as macOS.
    On all other platforms and in release mode, the default value is \c [].

    For example, building a dynamic library called \c MyLib that is multiplexed
    over the \l{qbs::buildVariants}{qbs.buildVariants} property with MSVC will
    produce files called \c{MyLib.dll} (for the release version of the product)
    and \c{MyLibd.dll} (for the debug version).

    \defaultvalue Platform-specific.
*/

/*!
    \qmlproperty string cpp::visibility

    \unixproperty

    The visibility level for exported symbols.

    Possible values include: \c{"default"}, \c{"hidden"}, \c{"hiddenInlines"},
    and \c{"minimal"}, which combines \c{"hidden"} and \c{"hiddenInlines"}.

    \defaultvalue \c{"default"}
*/

/*!
    \qmlproperty bool cpp::generateManifestFile
    \since Qbs 1.5.0

    \windowsproperty

    Whether to auto-generate a manifest file and include it in the binary.

    Set this property to \c false if you provide your own \c rc file.

    \defaultvalue \c{true}
*/

/*!
    \qmlproperty string cpp::windowsApiCharacterSet
    \since Qbs 1.0.1

    \windowsproperty


    The character set used in the Win32 API.

    The value \c "unicode" defines the preprocessor symbols \c UNICODE and
    \c _UNICODE, \c "mbcs" defines \c _MBCS, and setting the value to
    \c undefined will use the default character set.

    \defaultvalue \c{"unicode"}
*/

/*!
    \qmlproperty string cpp::windowsApiFamily
    \since Qbs 1.10

    \windowsproperty


    The Windows API family that the application or library is targeting.

    This value is used when building Universal Windows Platform applications.

    Possible values include: \c{"desktop"}, \c{"pc"}, \c{"phone"}, \c{"server"},
    and \c{"system"}, which are mapped to the corresponding set of possible
    values for the \c WINAPI_FAMILY preprocessor define in the Windows SDK.

    \defaultvalue Undefined, which lets the Windows SDK headers determine the
    default.
*/

/*!
    \qmlproperty stringList cpp::windowsApiAdditionalPartitions
    \since Qbs 1.10

    \windowsproperty

    A list of additional Windows API partitions to enable in addition to the
    ones implicitly enabled by the value of \l{cpp::}{windowsApiFamily}
    (\c WINAPI_FAMILY).

    This value is used when building Windows Store applications. For example,
    setting \l{cpp::}{windowsApiFamily} to \c{"pc"} and this property to
    \c{["phone"]} will allow you to create Windows Store applications that
    target all Universal Windows Platform device families (\c "Universal" apps).

    Possible values include: \c{"app"}, \c{"desktop"}, \c{"pc"}, \c{"phone"},
    \c{"server"}, and \c{"system"}, which are mapped to the corresponding set of
    possible \c WINAPI_PARTITION_* preprocessor defines in the Windows SDK.

    \defaultvalue Undefined, which lets the Windows SDK headers determine
    the default partitions based on the value of \c WINAPI_FAMILY.

    \sa windowsApiFamily
*/

/*!
    \qmlproperty bool cpp::requireAppContainer
    \since Qbs 1.10

    \windowsproperty

    Whether the generated executable or dynamic-link library \e requires an
    AppContainer execution environment. Set to \c true when creating
    Universal Windows Platform applications.

    \nodefaultvalue
*/

/*!
    \qmlproperty string cpp::minimumWindowsVersion

    \windowsproperty

    A version number in the format \c{[major].[minor]} indicating the earliest
    version of Windows that the product should run on.

    Defines \c WINVER, \c _WIN32_WINNT, and \c _WIN32_WINDOWS, and applies a
    version number to the linker flags \c /SUBSYSTEM and \c /OSVERSION for
    MSVC or \c --major-subsystem-version, \c --minor-subsystem-version,
    \c --major-os-version, and \c --minor-os-version for MinGW.

    If left undefined, compiler defaults will be used.

    \nodefaultvalue
*/

/*!
    \qmlproperty bool cpp::alwaysUseLipo
    \since Qbs 1.9

    Whether to always use \c lipo when combining Mach-O output files on
    Apple platforms, even if there is only one CPU architecture. This value
    should not normally need to be changed.

    \defaultvalue \c{false}
*/

/*!
    \qmlproperty var cpp::compilerDefinesByLanguage
    \since Qbs 1.10

    A \c{string} to \c{string} to \c{string} map of language tags to list of
    preprocessor macros that are used for all projects that are using the
    current toolchain.

    User project files usually do not set this property.

    \note This property will not be usable without also setting
    \l{cpp::}{enableCompilerDefinesByLanguage}.

    \nodefaultvalue
*/

/*!
    \qmlproperty pathList cpp::compilerIncludePaths
    \since Qbs 1.6

    A list of \c #include search paths that are used for all projects that are
    using the current toolchain.

    User project files usually do not set this property.

    \defaultvalue Determined automatically by probing the compiler.
*/

/*!
    \qmlproperty pathList cpp::compilerFrameworkPaths
    \since Qbs 1.6

    A list of framework search paths that are used for all projects that are
    using the current toolchain.

    User project files usually do not set this property.

    \defaultvalue Determined automatically by probing the compiler.
*/

/*!
    \qmlproperty pathList cpp::compilerLibraryPaths
    \since Qbs 1.6

    A list of library search paths that are used for all projects that are using
    the current toolchain.

    User project files usually do not set this property.

    \defaultvalue Determined automatically by probing the compiler.
*/

/*!
    \qmlproperty pathList cpp::distributionFrameworkPaths
    \since Qbs 1.8

    A list of distribution-specific framework search paths, prioritized after
    \l{cpp::}{systemFrameworkPaths}.

    Intended for use by module authors implementing support for new operating
    systems or distributions.

    User project files should not set this property.

    \nodefaultvalue
*/

/*!
    \qmlproperty pathList cpp::distributionIncludePaths
    \since Qbs 1.8

    A list of distribution-specific include paths that are passed as system
    include paths to the compiler, prioritized after
    \l{cpp::}{systemIncludePaths}.

    Intended for use by module authors implementing support for new operating
    systems or distributions.

    User project files should not set this property.

    \nodefaultvalue
*/

/*!
    \qmlproperty pathList cpp::distributionLibraryPaths
    \since Qbs 1.8

    A list of distribution-specific library search paths.

    Intended for use by module authors implementing support for new operating
    systems or distributions.

    User project files should not set this property.

    \nodefaultvalue
*/

/*!
    \qmlproperty stringList cpp::enableCompilerDefinesByLanguage
    \since Qbs 1.10

    A list of languages (one or more of \c{"c"}, \c{"cpp"}, \c{"objc"},
    \c{"objcpp"}) to extract the list of default compiler defines for in
    \l{cpp::}{compilerDefinesByLanguage}.

    Because this has performance implications, no languages are enabled by
    default.

    \nodefaultvalue
*/
