1/****************************************************************************
2**
3** Copyright (C) 2017 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of Qbs.
7**
8** $QT_BEGIN_LICENSE:FDL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Free Documentation License Usage
18** Alternatively, this file may be used under the terms of the GNU Free
19** Documentation License version 1.3 as published by the Free Software
20** Foundation and appearing in the file included in the packaging of
21** this file. Please review the following information to ensure
22** the GNU Free Documentation License version 1.3 requirements
23** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
24** $QT_END_LICENSE$
25**
26****************************************************************************/
27
28/*!
29    \qmltype cpp
30    \inqmlmodule QbsModules
31    \since Qbs 1.0
32
33    \brief Provides C/C++ support.
34
35    The \c cpp module contains the properties and rules for toolchains of the C/C++ family.
36    On Apple platforms, this includes support for Objective-C/C++.
37
38    \section2 Setting Up the Run Environment
39
40    When running an application that has dependencies on dynamic libraries, the
41    script specified by \l{Module::setupRunEnvironment}{Module.setupRunEnvironment}
42    automatically adds the locations of the libraries to the environment.
43    That is, to \c PATH on Windows, \c DYLD_LIBRARY_PATH on macOS,
44    and \c LD_LIBRARY_PATH on Linux and other Unix platforms. If the value
45    \c{"ignore-lib-dependencies"} shows up in the \c config array, this behavior
46    is disabled. Users can set the value via the \l run command.
47
48    \target dependency-parameters-cpp
49    \section2 Dependency Parameters
50
51    \table
52    \header
53        \li Parameter
54        \li Type
55        \li Since
56        \li Default
57        \li Description
58    \row
59        \li \c{link}
60        \li \c{bool}
61        \li 1.9
62        \li undefined
63        \li If \c{false}, the dependency will not be linked, even if
64            it is a valid input for a linker rule. This property
65            affects library dependencies only.
66    \row
67        \li \c{linkWholeArchive}
68        \li \c{bool}
69        \li 1.9
70        \li undefined
71        \li If \c{true}, then if the dependency is a static library, all of its objects
72            will be pulled into target binary, even if their symbols do not appear to be used.
73            This parameter is mainly useful when creating a dynamic library from static libraries.
74    \row
75        \li \c{symbolLinkMode}
76        \li \c{string}
77        \li 1.9
78        \li undefined
79        \li Attribute specifying how the library or framework will be linked.
80            May contain the values: "weak", "lazy", "reexport", and "upward"; refer to the Apple
81            ld64 man page for full details. \c{undefined} uses normal linking.
82            Currently only applies when linking for Apple platforms.
83    \endtable
84
85    \section2 Relevant File Tags
86    \target filetags-cpp
87
88    \table
89    \header
90        \li Tag
91        \li Auto-tagged File Names
92        \li Since
93        \li Description
94    \row
95        \li \c{"application"}
96        \li n/a
97        \li 1.0.1
98        \li The rule that creates executable files (typically via a linker) attaches this tag
99            to its output artifact.
100    \row
101        \li \c{"asm"}
102        \li \c{*.s} (for GCC-like toolchains), \c{*.asm} (for MSVC)
103        \li 1.1.0
104        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
105            assembler. One object file is generated for each such file.
106    \row
107        \li \c{"asm_cpp"}
108        \li \c{*.S}, \c{*.sx}
109        \li 1.1.0
110        \li Like \c{"asm"}, but for source files that need preprocessing. This tag only has an
111            effect with GCC-like toolchains.
112    \row
113        \li \c{"c"}
114        \li \c{*.c} (if \c combineCSources is not enabled)
115        \li 1.0.1
116        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
117            C compiler. One object file is generated for each such file.
118    \row
119        \li \c{"c.combine"}
120        \li \c{*.c} (if \c combineCSources is enabled)
121        \li 1.8
122        \li Source files with this tag serve as inputs to a rule combining them into
123            a single C file, which will then be compiled.
124    \row
125        \li \c{"cpp"}
126        \li \c{*.C}, \c{*.cpp}, \c{*.cxx}, \c{*.c++}, \c{*.cc}
127            (if \c combineCxxSources is not enabled)
128        \li 1.0.1
129        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
130            C++ compiler. One object file is generated for each such file.
131    \row
132        \li \c{"cpp.combine"}
133        \li \c{*.C}, \c{*.cpp}, \c{*.cxx}, \c{*.c++}, \c{*.cc}
134            (if \c combineCxxSources is enabled)
135        \li 1.8
136        \li Source files with this tag serve as inputs to a rule combining them into
137            a single C++ file, which will then be compiled.
138    \row
139        \li \c{"c_pch_src"}, \c{"cpp_pch_src"}, \c{"objc_pch_src"}, \c{"objcpp_pch_src"}
140        \li -
141        \li 1.5
142        \li Files with this tag will be turned into precompiled headers for C, C++, Objective-C
143            and Objective-C++, respectively. There can be only one such file per product and
144            language.
145    \row
146        \li \c{"def"}
147        \li -
148        \li 1.17.0
149        \li This tag is used for a module-definition file (.def) to be passed to the linker.
150            Such a file provides the linker with information about exports, attributes,
151            and other information about the program to be linked. This file tag only has
152            an effect with the MSVC toolchain.
153    \row
154        \li \c{"dynamiclibrary"}
155        \li n/a
156        \li 1.0.1
157        \li The rule that creates dynamic libraries (typically via a linker) attaches this tag
158            to its output artifact.
159    \row
160        \li \c{"dynamiclibrary_import"}
161        \li n/a
162        \li 1.0.0
163        \li This tag is used for import libraries of dynamic libraries.  For
164            example, the MSVC linker rule creates a \c{dynamiclibrary_import}
165            artifact \c{foo.lib} in addition to a \c{dynamiclibrary} artifact
166            \c{foo.dll}.
167    \row
168        \li \c{"hpp"}
169        \li \c{*.h}, \c{*.H}, \c{*.hpp}, \c{*.hxx}, \c{*.h++}
170        \li 1.0.1
171        \li This tag is used for header files (C, C++, Objective-C and Objective-C++). No rule
172            in this module generates output artifacts from such files directly, but the compiler
173            rule will have a dependency on all rules that create such files.
174    \row
175        \li \c{"linkerscript"}
176        \li -
177        \li 1.5.0
178        \li This tag is used for \c ld linker scripts. You can provide such a file if you need
179            to replace the default linker script.
180            This file tag only has an effect with GCC-like toolchains. The linker needs to be
181            \c{ld}-compatible.
182    \row
183        \li \c{"obj"}
184        \li n/a
185        \li 1.0.1
186        \li The rule that creates object files (typically via a compiler) attaches this tag
187            to its output artifacts. Such files are usually intermediate artifacts of the build
188            process and rarely need to be referenced in project files.
189    \row
190        \li \c{"objc"}
191        \li \c{*.m} (if \c combineObjcSources is not enabled)
192        \li 1.1.0
193        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
194            Objective-C compiler. One object file is generated for each such file.
195    \row
196        \li \c{"objc.combine"}
197        \li \c{*.m} (if \c combineObjcSources is enabled)
198        \li 1.8
199        \li Source files with this tag serve as inputs to a rule combining them into
200            a single Objective-C file, which will then be compiled.
201    \row
202        \li \c{"objcpp"}
203        \li \c{*.mm} (if \c combineObjcxxSources is not enabled)
204        \li 1.1.0
205        \li Source files with this tag serve as inputs to a rule invoking the toolchain's
206            Objective-C++ compiler. One object file is generated for each such file.
207    \row
208        \li \c{"objcpp.combine"}
209        \li \c{*.mm} (if \c combineObjcxxSources is enabled)
210        \li 1.8
211        \li Source files with this tag serve as inputs to a rule combining them into
212            a single Objective-C++ file, which will then be compiled.
213    \row
214        \li \c{"rc"}
215        \li \c{*.rc}
216        \li 1.1.0
217        \li Files with this tag serve as inputs to the Windows resource compiler. One object file
218            is generated for each such file. The tag has no effect on target platforms other than
219            Windows.
220    \row
221        \li \c{"staticlibrary"}
222        \li n/a
223        \li 1.0.1
224        \li The rule that creates static libraries (typically via a linker) attaches this tag
225            to its output artifact.
226    \row
227        \li \c{"versionscript"}
228        \li -
229        \li 1.5.0
230        \li This tag is used for \c ld linker scripts. You can provide such a file if you need
231            fine-grained control over the symbols present in a shared library.
232            This file tag only has an effect with GCC-like toolchains. The linker needs to be
233            \c{ld}-compatible.
234    \endtable
235
236    \section2 Relevant Job Pools
237    \target cpp-job-pools
238
239    \table
240    \header
241        \li Pool
242        \li Since
243        \li Description
244    \row
245        \li \c{"assembler"}
246        \li 1.13
247        \li The job pool used by rules that run the toolchain's assembler. This is only
248            relevant for direct invocations of the assembler binary, not for running it
249            indirectly via the compiler.
250    \row
251        \li \c{"compiler"}
252        \li 1.13
253        \li The job pool used by rules that run a compiler. All language variants use
254            the same pool.
255    \row
256        \li \c{"linker"}
257        \li 1.13
258        \li The job pool used by rules that run a linker.
259    \endtable
260*/
261
262/*!
263    \qmlproperty bool cpp::allowUnresolvedSymbols
264    \since Qbs 1.2
265
266    Set to \c true if you want the linking step to succeed even if the resulting
267    binary contains unresolved symbols. Normally, this makes little sense, but
268    in special cases it is possible that the respective symbols will be
269    available at load time even if they are not present during linking.
270
271    \nodefaultvalue
272*/
273
274/*!
275    \qmlproperty string cpp::architecture
276
277    The target architecture.
278
279    \defaultvalue \l{qbs::architecture}{qbs.architecture}
280*/
281
282/*!
283    \qmlproperty string cpp::endianness
284    \since Qbs 1.9
285
286    Specifies the endianness of the target platform's processor architecture
287    (\c{"big"} or \c{"little"}).
288
289    The value is automatically detected from the compiler's default values, but
290    can also be manually set in order to select a specific endianness when
291    targeting bi-endian architectures like MIPS and PowerPC.
292
293    \defaultvalue Compiler default value.
294*/
295
296/*!
297    \qmlproperty bool cpp::debugInformation
298
299    Whether to generate debug information.
300
301    \defaultvalue \l{qbs::debugInformation}{qbs.debugInformation}
302*/
303
304/*!
305    \qmlproperty bool cpp::combineCSources
306    \since Qbs 1.8
307
308    Enabling this property on a \l{Product}{product} instructs the
309    \l{FileTagger}{file tagger} to attach the tag \c{"c.combine"} to C sources,
310    rather than \c{"c"}. As a result, all C sources of the product will be
311    combined into a single file, which is then compiled.
312
313    This can speed up initial compilation significantly, but is of course
314    detrimental in the context of incremental builds. Also, perfectly legal code
315    may fail to compile with this option due to the merging of translation
316    units.
317
318    To enable this property in a product that has sources that cannot be merged,
319    put the sources into a dedicated \l{Group} and set their \l{Group::}
320    {fileTags} property to \c{"c"}, overriding the file tagger.
321
322    \note Module properties set on specific source files (that is, at the Group
323    level) will not be taken into account when building the combined file. You
324    either need to set these properties at the product level or prevent the
325    respective files from getting combined via the mechanism described above.
326
327    \defaultvalue \c false
328*/
329
330/*!
331    \qmlproperty bool cpp::combineCxxSources
332    \since Qbs 1.8
333
334    Like \l{cpp::}{combineCSources}, but for C++. The \l{filetags-cpp}
335    {relevant file tags} are \c{"cpp"} and \c{"cpp.combine"}.
336
337    \defaultvalue \c false
338
339    \sa combineCSources
340*/
341
342/*!
343    \qmlproperty bool cpp::combineObjcSources
344    \since Qbs 1.8
345
346    Like \l{cpp::}{combineCSources}, but for Objective-C. The \l{filetags-cpp}
347    {relevant file tags} are \c{"objc"} and \c{"objc.combine"}.
348
349    \defaultvalue \c false
350
351    \sa combineCSources
352*/
353
354/*!
355    \qmlproperty bool cpp::combineObjcxxSources
356    \since Qbs 1.8
357
358    Like \l{cpp::}{combineCSources}, but for Objective-C++. The \l{filetags-cpp}
359    {relevant file tags} are \c{"objcpp"} and \c{"objcpp.combine"}.
360
361    \defaultvalue \c false
362
363    \sa combineCSources
364*/
365
366/*!
367    \qmlproperty bool cpp::createSymlinks
368    \unixproperty
369
370    Whether to create version alias symlinks when building a dynamic library.
371
372    \defaultvalue \c true
373*/
374
375/*!
376    \qmlproperty bool cpp::discardUnusedData
377    \since Qbs 1.10
378
379    If this property is \c true, the linker will discard data from objects that
380    it determines to be unused. With MSVC and on Apple platforms, the
381    granularity is per symbol, elsewhere it is per section.
382
383    \nodefaultvalue
384*/
385
386/*!
387    \qmlproperty bool cpp::separateDebugInformation
388    \since Qbs 1.4
389
390    Whether to store debug information in an external file or bundle instead of
391    within the binary.
392
393    The type of files that will be generated when this property is \c{true} is
394    dependent on the compiler and target platform:
395
396    \list
397        \li With MSVC, this property controls the generation of
398            \c{.pdb} (Program Debug Database) files.
399        \li On Apple platforms with GCC or Clang, this property controls the
400            generation of \c{.dSYM} (DWARF Symbol) bundles or, if
401            \l{cpp::}{dsymutilFlags} contains the \c{-f} or \c{--flat} flags,
402            \c{.dwarf} symbol files.
403        \li On other platforms with GCC or Clang (including Windows/MinGW), this
404            property controls the generation of \c{.debug} symbol files.
405    \endlist
406
407    \defaultvalue \c{true} for MSVC and with GCC or Clang on Apple platforms,
408    otherwise \c{false}.
409
410    \sa debugInformation, {How do I separate and install debugging symbols?}
411*/
412
413/*!
414    \qmlproperty stringList cpp::defines
415
416    A list of preprocessor macros that gets passed to the compiler.
417
418    To set macro values, use the following syntax:
419
420    \code
421    cpp.defines: ["USE_COLORS=1", 'COLOR_STR="blanched almond"']
422    \endcode
423
424    \nodefaultvalue
425*/
426
427/*!
428    \qmlproperty stringList cpp::platformDefines
429
430    A list of preprocessor macros that are used for all projects that are built
431    for the current target platform. User project files usually do not set this
432    property.
433
434    \nodefaultvalue
435*/
436
437/*!
438    \qmlproperty pathList cpp::includePaths
439
440    A list of include paths.
441
442    Relative paths are considered to be relative to the \c .qbs product file
443    they are used in.
444
445    \nodefaultvalue
446*/
447
448/*!
449    \qmlproperty pathList cpp::systemIncludePaths
450
451    A list of include paths that are passed as system include paths to the
452    compiler.
453
454    For header files in those paths, warnings will be ignored.
455
456    Relative paths are considered to be relative to the \c .qbs product file
457    they are used in.
458
459    \nodefaultvalue
460*/
461
462/*!
463    \qmlproperty stringList cpp::systemRunPaths
464    \since Qbs 1.6
465
466    The paths the dynamic linker uses on process start-up to locate dynamic
467    libraries.
468
469    \defaultvalue Auto-detected for host builds on Linux via \c ldconfig,
470    \c{["/lib", "/usr/lib"]} otherwise on Unix, \c [] on Windows.
471*/
472
473/*!
474    \qmlproperty pathList cpp::libraryPaths
475
476    A list of library search paths.
477
478    The paths will be passed to the linker in the appropriate way. For
479    example, the \c {-L} argument will be used when using \c {ld}-like
480    linkers.
481
482    Relative paths are considered to be relative to the \c .qbs product file
483    they are used in.
484
485    \nodefaultvalue
486
487    \sa dynamicLibraries, {How do I create a module for a third-party library?}
488*/
489
490/*!
491    \qmlproperty stringList cpp::dynamicLibraries
492
493    A List of dynamic libraries to be linked.
494
495    If the library is part of your project, consider using a \l{Depends} item
496    instead.
497
498    Each library can be specified in one of two ways:
499
500    \list
501    \li An absolute file path (for example, \c "/foo/bar.lib"), in which case
502        it is passed directly to the linker, ignoring \l libraryPaths.
503    \li A library basename (for example, \c "bar"), in which case
504        the directory that contains the library must be provided via
505        \l libraryPaths.
506    \endlist
507
508    Relative paths (\c "foo/bar.lib") are not allowed.
509
510    \nodefaultvalue
511
512    \sa libraryPaths, {How do I create a module for a third-party library?}
513*/
514
515/*!
516    \qmlproperty stringList cpp::staticLibraries
517
518    A list of static libraries to be linked.
519
520    If the library is part of your project, consider using a \l{Depends} item
521    instead.
522
523    \nodefaultvalue
524*/
525
526/*!
527    \qmlproperty string cpp::executablePrefix
528
529    A string to prepend to the executable file \l{Product::targetName}{name}.
530
531    \defaultvalue \c ""
532*/
533
534/*!
535    \qmlproperty string cpp::dynamicLibraryPrefix
536
537    A string to prepend to the dynamic library file \l{Product::targetName}{name}.
538
539    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c "" or \c "lib"
540*/
541
542/*!
543    \qmlproperty string cpp::loadableModulePrefix
544    \appleproperty
545
546    A string to prepend to the Darwin loadable module file \l{Product::targetName}{name}.
547
548    \defaultvalue \c ""
549*/
550
551/*!
552    \qmlproperty string cpp::staticLibraryPrefix
553
554    A string to prepend to the static library file \l{Product::targetName}{name}.
555
556    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c "" or \c "lib"
557*/
558
559/*!
560    \qmlproperty string cpp::executableSuffix
561
562    A string to append to the executable file \l{Product::targetName}{name}.
563
564    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c "" or \c ".exe"
565*/
566
567/*!
568    \qmlproperty string cpp::dynamicLibrarySuffix
569
570    A string to append to the dynamic library file \l{Product::targetName}{name}.
571
572    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c ".so", \c ".dll"
573    or \c "dylib"
574*/
575
576/*!
577    \qmlproperty string cpp::dynamicLibraryImportSuffix
578    \windowsproperty
579
580    A string to append to the dynamic library import file \l{Product::targetName}{name}.
581
582    \defaultvalue \c ".lib"
583*/
584
585/*!
586    \qmlproperty string cpp::loadableModuleSuffix
587    \appleproperty
588
589    A string to append to the Darwin loadable module file \l{Product::targetName}{name}.
590
591    \defaultvalue \c ".bundle"
592*/
593
594/*!
595    \qmlproperty string cpp::staticLibrarySuffix
596
597    A string to append to the executable file \l{Product::targetName}{name}.
598
599    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c ".a" or \c ".lib"
600*/
601
602/*!
603    \qmlproperty string cpp::debugInfoSuffix
604
605    A string to append to the debug information file name.
606
607    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c ".debug",
608    \c ".pdb" or \c ".dwarf"
609*/
610
611/*!
612    \qmlproperty string cpp::debugInfoBundleSuffix
613    \appleproperty
614
615    A string to append to the debug information bundle name.
616
617    \defaultvalue \c ".dSYM"
618*/
619
620/*!
621    \qmlproperty string cpp::objectSuffix
622
623    A string to append to the generated object files.
624
625    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c ".o" or \c ".obj"
626*/
627
628/*!
629    \qmlproperty string cpp::linkerMapSuffix
630
631    A string to append to the generated linker memory map files.
632
633    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical value is \c ".map"
634*/
635
636/*!
637    \qmlproperty string cpp::compilerListingSuffix
638
639    A string to append to the generated compiler listing files.
640
641    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical value is \c ".lst"
642*/
643
644/*!
645    \qmlproperty string cpp::assemblerListingSuffix
646
647    A string to append to the generated assembler listing files.
648
649    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical value is \c ".lst"
650*/
651
652/*!
653    \qmlproperty pathList cpp::prefixHeaders
654    \since Qbs 1.0.1
655
656    A list of files to automatically include at the beginning of each source
657    file in the \l{Product}{product}.
658
659    \nodefaultvalue
660*/
661
662/*!
663    \qmlproperty string cpp::optimization
664
665    The optimization level.
666
667    \defaultvalue \l{qbs::optimization}{qbs.optimization}
668*/
669
670/*!
671    \qmlproperty bool cpp::treatWarningsAsErrors
672
673    Whether warnings will be handled as errors and cause the build to fail.
674
675    \defaultvalue \c{false}
676*/
677
678/*!
679    \qmlproperty bool cpp::useCPrecompiledHeader
680    \since Qbs 1.5
681
682    Whether to use a precompiled header for compiling C sources if one is
683    present.
684
685    Set this property to \c false in a \l Group item to disable precompiled
686    headers for some sources even though a precompiled header is present in the
687    product.
688
689    See \l{filetags-cpp}{Relevant File Tags} for the associated file tags.
690
691    \defaultvalue \c true
692*/
693
694/*!
695    \qmlproperty bool cpp::useCxxPrecompiledHeader
696    \since Qbs 1.5
697
698    Like \l useCPrecompiledHeader, but for C++.
699
700    \defaultvalue \c true
701*/
702
703/*!
704    \qmlproperty bool cpp::useObjcPrecompiledHeader
705    \since Qbs 1.5
706
707    Like \l useCPrecompiledHeader, but for Objective-C.
708
709    \defaultvalue \c true
710*/
711
712/*!
713    \qmlproperty bool cpp::useObjcxxPrecompiledHeader
714    \since Qbs 1.5
715
716    Like \l useCPrecompiledHeader, but for Objective-C++.
717
718    \defaultvalue \c true
719*/
720
721/*!
722    \qmlproperty string cpp::warningLevel
723
724    The warning level for the compiler: \c{"none"} or \c{"all"}.
725
726    \defaultvalue \c{"all"}
727*/
728
729/*!
730    \qmlproperty stringList cpp::driverFlags
731    \since Qbs 1.6
732
733    A list of flags that are added to all compilation and linking commands
734    performed by the compiler driver, independently of the language.
735
736    \nodefaultvalue
737*/
738
739/*!
740    \qmlproperty stringList cpp::driverLinkerFlags
741    \since Qbs 1.11
742
743    A list of flags that are added to all linking commands performed by the
744    compiler driver, independently of the language.
745
746    \nodefaultvalue
747*/
748
749/*!
750    \qmlproperty stringList cpp::commonCompilerFlags
751    \since Qbs 1.0.1
752
753    A list of flags that are added to all compilation commands independently of
754    the language.
755
756    \nodefaultvalue
757*/
758
759/*!
760    \qmlproperty string cpp::compilerVersion
761
762    Compiler version string consisting of major, minor and patch numbers,
763    separated by a dot.
764
765    \nodefaultvalue
766*/
767
768/*!
769    \qmlproperty int cpp::compilerVersionMajor
770    \since Qbs 1.4
771
772    The major version of the compiler.
773
774    \nodefaultvalue
775*/
776
777/*!
778    \qmlproperty int cpp::compilerVersionMinor
779    \since Qbs 1.4
780
781    The minor version of the compiler.
782
783    \nodefaultvalue
784*/
785
786/*!
787    \qmlproperty int cpp::compilerVersionPatch
788    \since Qbs 1.4
789
790    The patch level component of the compiler version.
791
792    \nodefaultvalue
793*/
794
795/*!
796    \qmlproperty stringList cpp::assemblerFlags
797    \since Qbs 1.5
798
799    A list of additional flags for the assembler.
800
801    \nodefaultvalue
802*/
803
804/*!
805    \qmlproperty stringList cpp::cppFlags
806
807    A list of additional flags for the C preprocessor.
808
809    \nodefaultvalue
810*/
811
812/*!
813    \qmlproperty stringList cpp::cFlags
814
815    A list of additional flags for the C compiler.
816
817    \nodefaultvalue
818*/
819
820/*!
821    \qmlproperty stringList cpp::cxxFlags
822
823    A list of additional flags for the C++ compiler.
824
825    \nodefaultvalue
826*/
827
828/*!
829    \qmlproperty stringList cpp::cLanguageVersion
830    \since Qbs 1.4
831
832    The version of the C standard with which the code must comply.
833
834    If this property is set, the corresponding compiler and linker flags will be
835    added, depending on the toolchain.
836
837    If the value is left undefined, the compiler default will be used.
838    If the list contains more than one value, the highest version is chosen.
839
840    Possible values include: \c{"c89"}, \c{"c99"}, \c{"c11"}.
841
842    \nodefaultvalue
843*/
844
845/*!
846    \qmlproperty stringList cpp::cxxLanguageVersion
847    \since Qbs 1.4
848
849    The version of the C++ standard with which the code must comply.
850
851    If this property is set, the corresponding compiler and linker flags will be
852    added, depending on the toolchain.
853
854    If the value is left undefined, the compiler default will be used.
855    If the list contains more than one value, the highest version is chosen.
856
857    Possible values include: \c{"c++98"}, \c{"c++11"}, \c{"c++14"}, \c{"c++17"}, \c{"c++20"},
858                             \c{"c++23"}.
859
860    \nodefaultvalue
861*/
862
863/*!
864    \qmlproperty bool cpp::useLanguageVersionFallback
865    \since Qbs 1.11
866
867    Whether to explicitly use the language standard version fallback values in
868    compiler command line invocations.
869
870    By default, \QBS will automatically substitute fallback values for the C and
871    C++ language standard versions specified by the \l cLanguageVersion and
872    \l cxxLanguageVersion properties, which are passed to the \c{-std=} compiler
873    command line option with GNU-compatible toolchains, if it detects that you
874    are using an older toolchain which does not support the standard values. The
875    substitutions are made as follows:
876
877    \table
878    \header
879        \li Value
880        \li Substitute
881    \row
882        \li c++11
883        \li c++0x
884    \row
885        \li c11
886        \li c1x
887    \row
888        \li c++14
889        \li c++1y
890    \row
891        \li c++17
892        \li c++1z
893    \endtable
894
895    If this property is explicitly set to \c true, \QBS will always use the
896    fallback values.
897
898    If this property is explicitly set to \c false, \QBS will never use the
899    fallback values.
900
901    This property has no effect with the Microsoft Visual C++ compiler.
902
903    \nodefaultvalue
904*/
905
906/*!
907    \qmlproperty string cpp::cxxStandardLibrary
908    \since Qbs 1.4
909
910    The C++ standard library to link to.
911
912    If this property is set, the corresponding compiler and linker flags will be
913    added, assuming the value is valid for the current toolchain.
914
915    If the value is left undefined, the compiler default will be used.
916
917    Possible values include: \c{"libstdc++"}, \c{"libc++"}.
918
919    \nodefaultvalue
920*/
921
922/*!
923    \qmlproperty stringList cpp::objcFlags
924
925    A list of additional flags for the Objective-C compiler.
926
927    \nodefaultvalue
928*/
929
930/*!
931    \qmlproperty stringList cpp::objcxxFlags
932
933    A list of additional flags for the Objective-C++ compiler.
934
935    \nodefaultvalue
936*/
937
938/*!
939    \qmlproperty stringList cpp::linkerFlags
940
941    A list of additional flags for the linker.
942
943    These flags should \e not be escaped using the \c -Wl or \c -Xlinker
944    syntaxes, as \QBS will do this automatically based on the linker being used.
945
946    \sa linkerMode
947
948    \nodefaultvalue
949*/
950
951/*!
952    \qmlproperty string cpp::assemblerName
953    \since Qbs 1.5
954
955    The name of the assembler binary. This property is set in the build profile.
956
957    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
958*/
959
960/*!
961    \qmlproperty string cpp::toolchainInstallPath
962
963    The directory path where the toolchain is installed. This property is set
964    in the build profile.
965
966    This is usually the base property from which all compiler and tool paths
967    are automatically derived.
968
969    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
970*/
971
972/*!
973    \qmlproperty string cpp::assemblerPath
974    \since Qbs 1.5
975
976    The full path of the assembler binary. This property is set in the build
977    profile.
978
979    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
980*/
981
982/*!
983    \qmlproperty string cpp::compilerName
984
985    The name of the main compiler binary. This property is set in the build profile.
986
987    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
988*/
989
990/*!
991    \qmlproperty string cpp::compilerPath
992
993    The full path of the main compiler binary. This property is set in the build profile.
994
995    If the toolchain provides different compilers for different languages,
996    \l{cpp::}{compilerPathByLanguage} is used.
997
998    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
999*/
1000
1001/*!
1002    \qmlproperty var cpp::compilerPathByLanguage
1003    \since Qbs 1.3
1004
1005    A \c{string} to \c{string} map that maps file tags to full paths of compiler
1006    binaries. This property is set in the build profile.
1007
1008    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
1009*/
1010
1011/*!
1012    \qmlproperty stringList cpp::compilerWrapper
1013    \since Qbs 1.1
1014
1015    A wrapper binary and its arguments for wrapping compiler calls.
1016    This is useful for compiler wrappers, such as \c ccache.
1017
1018    \nodefaultvalue
1019*/
1020
1021/*!
1022    \qmlproperty string cpp::linkerName
1023    \since Qbs 1.1.1
1024
1025    The name of the linker binary. This property is set in the build profile.
1026
1027    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
1028*/
1029
1030/*!
1031    \qmlproperty string cpp::linkerPath
1032    \since Qbs 1.1.1
1033
1034    The full path of the linker binary. This property is set in the build profile.
1035
1036    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
1037*/
1038
1039/*!
1040    \qmlproperty stringList cpp::linkerWrapper
1041    \since Qbs 1.6.2
1042
1043    A wrapper binary and its arguments for wrapping linker calls.
1044    This is useful for linker wrappers as needed by Bullseye Coverage, for
1045    example.
1046
1047    \nodefaultvalue
1048*/
1049
1050/*!
1051    \qmlproperty string cpp::entryPoint
1052    \since Qbs 1.3
1053
1054    The name of the entry point of an executable or dynamic library.
1055
1056    If this property is left undefined, the toolchain's default is used.
1057
1058    \nodefaultvalue
1059*/
1060
1061/*!
1062    \qmlproperty string cpp::runtimeLibrary
1063    \since Qbs 1.3.3
1064
1065    The type of the runtime library used.
1066
1067    Accepted values are \c{"static"} and \c{"dynamic"}.
1068
1069    If this property is set to \c{undefined}, the default runtime library of the
1070    toolchain is used.
1071
1072    \note This property is only functional for MSVC and MinGW.
1073
1074    \defaultvalue \c{"dynamic"} for MSVC and MinGW, \c{undefined} for other compilers.
1075*/
1076
1077/*!
1078    \qmlproperty bool cpp::enableExceptions
1079    \since Qbs 1.5
1080
1081    Whether to enable exceptions in C++ code.
1082
1083    \defaultvalue \c{true}
1084*/
1085
1086/*!
1087    \qmlproperty bool cpp::enableSuspiciousLinkerFlagWarnings
1088    \since Qbs 1.8
1089
1090    Whether to print warnings about escaped linker flags (such as \c -Xlinker and \c -Wl).
1091
1092    \defaultvalue \c{true}
1093*/
1094
1095/*!
1096    \qmlproperty string cpp::exceptionHandlingModel
1097    \since Qbs 1.5
1098
1099    The exception handling model to use.
1100
1101    For MSVC, this can be \c{"default"}, \c{"seh"} or \c{"externc"}. For all
1102    other compilers, \c{"default"} indicates the default or the only exception
1103    handling model.
1104
1105    \defaultvalue \c{"default"}
1106*/
1107
1108/*!
1109    \qmlproperty bool cpp::enableRtti
1110    \since Qbs 1.5
1111
1112    Whether to enable runtime type information in C++ code.
1113
1114    \nodefaultvalue
1115*/
1116
1117/*!
1118    \qmlproperty bool cpp::enableReproducibleBuilds
1119    \since Qbs 1.5
1120
1121    Whether the compiler should try to generate reproducible object files.
1122
1123    Some compilers (notably GCC) use random numbers for generating symbol names
1124    that have to be different in every compilation unit. This is avoided by
1125    setting this property to \c{true}.
1126
1127    \defaultvalue \c{false}
1128*/
1129
1130/*!
1131    \qmlproperty bool cpp::treatSystemHeadersAsDependencies
1132    \since Qbs 1.8
1133
1134    Whether included header files found via \l{cpp::}{systemIncludePaths},
1135    \l{cpp::}{distributionIncludePaths}, or \l{cpp::}{compilerIncludePaths}
1136    will be added to the dependencies of the respective object file.
1137
1138    This means that modification of such header files (or any of the headers
1139    they include) will cause recompilation.
1140
1141    \defaultvalue \c{false}
1142*/
1143
1144/*!
1145    \qmlproperty stringList cpp::dsymutilFlags
1146    \since Qbs 1.4.1
1147
1148    \appleproperty
1149
1150    Additional flags for the \c dsymutil tool.
1151
1152    \note If this property contains the \c{-f} or \c{--flat} options, this will
1153    cause \QBS to generate "flat" (single-file) \c{.dwarf} debug symbol files
1154    instead of \c{.dSYM} bundles (directories) when
1155    \l{cpp::}{separateDebugInformation} is set to \c{true}.
1156
1157    \nodefaultvalue
1158*/
1159
1160/*!
1161    \qmlproperty string cpp::dsymutilPath
1162    \since Qbs 1.4
1163
1164    \appleproperty
1165
1166    The full path of the \c dsymutil binary. This property is set in the build
1167    profile.
1168
1169    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
1170*/
1171
1172/*!
1173    \qmlproperty string cpp::lipoPath
1174    \since Qbs 1.9
1175
1176    \appleproperty
1177
1178    The full path of the \c lipo binary.
1179
1180    \defaultvalue Determined automatically.
1181*/
1182
1183/*!
1184    \qmlproperty pathList cpp::frameworkPaths
1185
1186    \appleproperty
1187
1188    A list of framework search paths.
1189
1190    Relative paths are considered to be relative to the \c .qbs product file
1191    they are used in.
1192
1193    \nodefaultvalue
1194*/
1195
1196/*!
1197    \qmlproperty pathList cpp::systemFrameworkPaths
1198
1199    \appleproperty
1200
1201    A list of framework search paths.
1202
1203    Relative paths are considered to be relative to the \c .qbs product file
1204    they are used in. Header files in frameworks in those paths will not cause
1205    warnings.
1206
1207    \nodefaultvalue
1208*/
1209
1210/*!
1211    \qmlproperty stringList cpp::frameworks
1212
1213    \appleproperty
1214
1215    A list of frameworks to be linked.
1216
1217    If the framework is part of your project, consider using a \l{Depends} item
1218    instead.
1219
1220    \nodefaultvalue
1221*/
1222
1223/*!
1224    \qmlproperty stringList cpp::weakFrameworks
1225
1226    \appleproperty
1227
1228    A list of frameworks to be weakly linked.
1229
1230    If the framework is part of your project, consider using a \l{Depends} item
1231    instead.
1232
1233    \nodefaultvalue
1234*/
1235
1236/*!
1237    \qmlproperty bool cpp::automaticReferenceCounting
1238    \since Qbs 1.4
1239
1240    \appleproperty
1241
1242    Whether to enable Automatic Reference Counting (ARC) for Objective-C and
1243    Objective-C++ source code.
1244
1245    If left undefined, uses the compiler default (probably \c{false}).
1246
1247    \nodefaultvalue
1248*/
1249
1250/*!
1251    \qmlproperty bool cpp::requireAppExtensionSafeApi
1252    \since Qbs 1.4
1253
1254    \appleproperty
1255
1256    Whether to enforce the use of only app-extension-safe APIs on Apple
1257    platforms. This is necessary for building Application Extensions in OS X
1258    Yosemite and iOS 8 and above.
1259
1260    If left undefined, uses the compiler and linker defaults (probably
1261    \c{false}).
1262
1263    \nodefaultvalue
1264*/
1265
1266/*!
1267    \qmlproperty string cpp::minimumIosVersion
1268
1269    \appleproperty
1270
1271    A version number in the format \c{[major].[minor]} indicating the earliest
1272    version of iOS that the product should run on.
1273
1274    Passes \c{-miphoneos-version-min=<version>} to the compiler.
1275
1276    If set to undefined, compiler defaults will be used.
1277
1278    \note \QBS sets minimum version to \c "6.0" for \c armv7a because earlier iOS versions are
1279    broken in recent XCode installations.
1280
1281    \defaultvalue \c "6.0" for \c armv7a, \c undefined otherwise
1282*/
1283
1284/*!
1285    \qmlproperty string cpp::minimumOsxVersion
1286    \obsolete
1287
1288    \appleproperty
1289
1290    Deprecated in \QBS 1.5.2. Use \l{cpp::minimumMacosVersion} instead.
1291
1292    \nodefaultvalue
1293*/
1294
1295/*!
1296    \qmlproperty string cpp::minimumMacosVersion
1297    \since Qbs 1.5.2
1298
1299    \appleproperty
1300
1301    A version number in the format \c{[major].[minor]}indicating the earliest
1302    version of macOS that the product should run on.
1303
1304    Passes \c{-mmacosx-version-min=<version>} to the compiler.
1305
1306    If left undefined, compiler defaults will be used.
1307
1308    \nodefaultvalue
1309*/
1310
1311/*!
1312    \qmlproperty string cpp::minimumWatchosVersion
1313
1314    \appleproperty
1315
1316    A version number in the format \c{[major].[minor]} indicating the earliest
1317    version of Apple watchOS that the product should run on.
1318
1319    If left undefined, compiler defaults will be used.
1320
1321    \nodefaultvalue
1322*/
1323
1324/*!
1325    \qmlproperty string cpp::minimumTvosVersion
1326    \since Qbs 1.5
1327
1328    \appleproperty
1329
1330    A version number in the format \c{[major].[minor]} indicating the earliest
1331    version of Apple tvOS that the product should run on.
1332
1333    If left undefined, compiler defaults will be used.
1334
1335    \note \QBS sets the minimum version to \c "6.0", because earlier tvOS
1336    versions are not supported by recent XCode installations by default.
1337
1338    \defaultvalue \c "6.0
1339*/
1340
1341/*!
1342    \qmlproperty string cpp::archiverName
1343
1344    \unixproperty
1345
1346    The name of the archiver binary. This property is set in the build profile.
1347
1348    \defaultvalue \c{"ar"}
1349*/
1350
1351/*!
1352    \qmlproperty string cpp::archiverPath
1353
1354    \unixproperty
1355
1356    The full path of the archiver binary. This property is set in the build
1357    profile.
1358
1359    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
1360*/
1361
1362/*!
1363    \qmlproperty string cpp::exportedSymbolsCheckMode
1364    \since Qbs 1.4.1
1365
1366    \unixproperty
1367
1368    Controls how \QBS determines whether an updated dynamic library causes
1369    relinking of dependents.
1370
1371    The default value is \c "ignore-undefined", which means that undefined
1372    symbols being added or removed do not cause any relinking. If that should
1373    happen, for example because dependent products are linked with an option
1374    such as \c "--no-undefined", this property can be set to \c "strict".
1375
1376    \defaultvalue \c "ignore-undefined"
1377*/
1378
1379/*!
1380    \qmlproperty string cpp::linkerMode
1381    \since Qbs 1.6
1382
1383    Controls whether to automatically use an appropriate compiler frontend
1384    instead of the system linker when linking binaries.
1385
1386    The default is \c{"automatic"}, which chooses either the C++ compiler, C
1387    compiler, or system linker specified by the \l{cpp::}{linkerName} and
1388    \l{cpp::}{linkerPath} properties, depending on the type of object files
1389    present on the linker command line.
1390
1391    Set this property to \c{"manual"} to explicitly specify the linker using the
1392    \l{cpp::}{linkerName} and \l{cpp::}{linkerPath} properties.
1393
1394    \defaultvalue \c "automatic"
1395*/
1396
1397/*!
1398    \qmlproperty string cpp::linkerVariant
1399    \since Qbs 1.13
1400
1401    Set this property to force the use of a specific linker. A non-empty value
1402    will result in the \c {-fuse-ld} option being emitted when linking with \c gcc,
1403    \c clang or \c clang-cl. Other toolchains do not support this property.
1404
1405    The possible values for \c clang and \c gcc are \c "bfd", \c "gold" and \c "lld",
1406    the possible values for \c clang-cl are \c "link" and \c "lld".
1407
1408    The following example demonstrates how to change the linker for different toolchains:
1409
1410    \code
1411    Properties {
1412        condition: qbs.toolchain.contains("gcc")
1413        cpp.linkerVariant: "gold"
1414    }
1415    Properties {
1416        condition: qbs.toolchain.contains("clang-cl")
1417        cpp.linkerVariant: "lld"
1418    }
1419    \endcode
1420
1421    \nodefaultvalue
1422*/
1423
1424/*!
1425    \qmlproperty string cpp::nmName
1426    \since Qbs 1.2
1427
1428    \unixproperty
1429
1430    The name of the \c nm binary. This property is set in the build profile.
1431
1432    \defaultvalue \c{"nm"}
1433*/
1434
1435/*!
1436    \qmlproperty string cpp::nmPath
1437    \since Qbs 1.2
1438
1439    \unixproperty
1440
1441    The full path of the \c nm binary. This property is set in the build
1442    profile.
1443
1444    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
1445*/
1446
1447/*!
1448    \qmlproperty string cpp::objcopyName
1449    \since Qbs 1.4
1450
1451    \unixproperty
1452
1453    The name of the \c objcopy binary. This property is set in the build
1454    profile.
1455
1456    \defaultvalue \c{"objcopy"}
1457*/
1458
1459/*!
1460    \qmlproperty string cpp::objcopyPath
1461    \since Qbs 1.4
1462
1463    \unixproperty
1464
1465    The full path of the \c objcopy binary. This property is set in the build
1466    profile.
1467
1468    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
1469*/
1470
1471/*!
1472    \qmlproperty string cpp::stripName
1473    \since Qbs 1.4
1474
1475    \unixproperty
1476
1477    The name of the \c strip binary. This property is set in the build profile.
1478
1479    \defaultvalue \c{"strip"}
1480*/
1481
1482/*!
1483    \qmlproperty string cpp::stripPath
1484    \since Qbs 1.4
1485
1486    \unixproperty
1487
1488    The full path of the \c strip binary. This property is set in the build
1489    profile.
1490
1491    \defaultvalue Determined by \l{setup-toolchains}{qbs setup-toolchains}.
1492*/
1493
1494/*!
1495    \qmlproperty bool cpp::positionIndependentCode
1496
1497    \unixproperty
1498
1499    Whether to generate position-independent code.
1500
1501    If this property is left undefined, position-independent code is generated
1502    for libraries, but not for applications.
1503
1504    \nodefaultvalue
1505*/
1506
1507/*!
1508    \qmlproperty string cpp::rpathOrigin
1509    \since Qbs 1.11
1510
1511    \unixproperty
1512
1513    A placeholder value used in an \c rpath string to refer to the directory
1514    containing the referring executable or shared library.
1515
1516    \defaultvalue \c{"@loader_path"} on Mach-O based platforms (macOS, iOS,
1517    tvOS, watchOS); \c{"$ORIGIN"} on ELF based platforms (Linux and most other
1518    Unix-like platforms).
1519*/
1520
1521/*!
1522    \qmlproperty stringList cpp::rpaths
1523
1524    \unixproperty
1525
1526    A list of \c rpaths that are passed to the linker. Paths that also appear in
1527    \l{cpp::}{systemRunPaths} are ignored.
1528
1529    \nodefaultvalue
1530
1531    \sa{How do I make use of rpaths?}
1532*/
1533
1534/*!
1535    \qmlproperty string cpp::sonamePrefix
1536    \since Qbs 1.5
1537
1538    \unixproperty
1539
1540    A library name or full library path.
1541
1542    If defined, the value of this property is used as a path to be prepended to
1543    the built shared library's \c SONAME identifier. The \c SONAME
1544    (\c LC_ID_DYLIB on Apple platforms, \c DT_SONAME on other Unix-like
1545    platforms) is the identifier that the dynamic linker will later use to
1546    reference the library.
1547
1548    On Apple platforms, the path may contain the following placeholders:
1549
1550    \list
1551        \li \c @rpath -
1552            Expands to paths defined by \c LC_RPATH Mach-O commands in
1553            the current process executable or the referring libraries.
1554        \li \c @executable_path -
1555            Expands to the current process executable location.
1556        \li \c @loader_path -
1557            Expands to the referring executable or library location.
1558    \endlist
1559
1560    In most cases, using \c @rpath is sufficient and recommended.
1561    However, the prefix may be also specified using different placeholders, or
1562    an absolute path.
1563
1564    For more information, see the \l{DYLD documentation} on dynamic library
1565    install names.
1566
1567    \nodefaultvalue
1568
1569    \sa{How do I make use of rpaths?}
1570*/
1571
1572/*!
1573    \qmlproperty string cpp::soVersion
1574    \since Qbs 1.7
1575
1576    \unixproperty
1577
1578    The version number to be appended to the soname in ELF shared libraries.
1579
1580    \defaultvalue The major part of \l{Product::version}{product.version} if a
1581    version is set, otherwise \c [].
1582*/
1583
1584/*!
1585    \qmlproperty bool cpp::useRPaths
1586    \since Qbs 1.3
1587
1588    \unixproperty
1589
1590    If \c{false}, prevents the linker from writing \c rpaths to the binary.
1591
1592    \defaultvalue \c{true}
1593*/
1594
1595/*!
1596    \qmlproperty bool cpp::useRPathLink
1597    \since Qbs 1.8
1598
1599    \unixproperty
1600
1601    Whether to use the \c{-rpath-link} linker option for transitive shared
1602    objects.
1603
1604    \defaultvalue \c{true} on non-Darwin Unix platforms or when targeting
1605    macOS 10.4.x and older.
1606*/
1607
1608/*!
1609    \qmlproperty string cpp::rpathLinkFlag
1610    \since Qbs 1.9
1611
1612    The rpath link flag used by the linker.
1613
1614    \defaultvalue \l{qbs::toolchain}{toolchain}-dependent, typical values are \c "-rpath-link="
1615    or \c "-L"
1616*/
1617
1618/*!
1619    \qmlproperty string cpp::variantSuffix
1620    \since Qbs 1.10
1621
1622    A suffix to add to a product's target name if that product is of the
1623    \l{Product::type}{type} \c staticlibrary or \c dynamiclibrary.
1624
1625    On Darwin platforms, applications and loadable modules are also affected.
1626
1627    By default, this property is left empty on all platforms unless the product
1628    is multiplexed over the \l{qbs::buildVariants}{qbs.buildVariants} property.
1629    In that case, for the debug variant of the product, the default value
1630    is \c{"d"} on Windows and \c{"_debug"} on Darwin platforms, such as macOS.
1631    On all other platforms and in release mode, the default value is \c [].
1632
1633    For example, building a dynamic library called \c MyLib that is multiplexed
1634    over the \l{qbs::buildVariants}{qbs.buildVariants} property with MSVC will
1635    produce files called \c{MyLib.dll} (for the release version of the product)
1636    and \c{MyLibd.dll} (for the debug version).
1637
1638    \defaultvalue Platform-specific.
1639*/
1640
1641/*!
1642    \qmlproperty string cpp::visibility
1643
1644    \unixproperty
1645
1646    The visibility level for exported symbols.
1647
1648    Possible values include: \c{"default"}, \c{"hidden"}, \c{"hiddenInlines"},
1649    and \c{"minimal"}, which combines \c{"hidden"} and \c{"hiddenInlines"}.
1650
1651    \defaultvalue \c{"default"}
1652*/
1653
1654/*!
1655    \qmlproperty bool cpp::generateManifestFile
1656    \since Qbs 1.5.0
1657
1658    \windowsproperty
1659
1660    Whether to auto-generate a manifest file and include it in the binary.
1661
1662    Set this property to \c false if you provide your own \c rc file.
1663
1664    \defaultvalue \c{true}
1665*/
1666
1667/*!
1668    \qmlproperty string cpp::windowsApiCharacterSet
1669    \since Qbs 1.0.1
1670
1671    \windowsproperty
1672
1673
1674    The character set used in the Win32 API.
1675
1676    The value \c "unicode" defines the preprocessor symbols \c UNICODE and
1677    \c _UNICODE, \c "mbcs" defines \c _MBCS, and setting the value to
1678    \c undefined will use the default character set.
1679
1680    \defaultvalue \c{"unicode"}
1681*/
1682
1683/*!
1684    \qmlproperty string cpp::windowsApiFamily
1685    \since Qbs 1.10
1686
1687    \windowsproperty
1688
1689
1690    The Windows API family that the application or library is targeting.
1691
1692    This value is used when building Universal Windows Platform applications.
1693
1694    Possible values include: \c{"desktop"}, \c{"pc"}, \c{"phone"}, \c{"server"},
1695    and \c{"system"}, which are mapped to the corresponding set of possible
1696    values for the \c WINAPI_FAMILY preprocessor define in the Windows SDK.
1697
1698    \defaultvalue Undefined, which lets the Windows SDK headers determine the
1699    default.
1700*/
1701
1702/*!
1703    \qmlproperty stringList cpp::windowsApiAdditionalPartitions
1704    \since Qbs 1.10
1705
1706    \windowsproperty
1707
1708    A list of additional Windows API partitions to enable in addition to the
1709    ones implicitly enabled by the value of \l{cpp::}{windowsApiFamily}
1710    (\c WINAPI_FAMILY).
1711
1712    This value is used when building Windows Store applications. For example,
1713    setting \l{cpp::}{windowsApiFamily} to \c{"pc"} and this property to
1714    \c{["phone"]} will allow you to create Windows Store applications that
1715    target all Universal Windows Platform device families (\c "Universal" apps).
1716
1717    Possible values include: \c{"app"}, \c{"desktop"}, \c{"pc"}, \c{"phone"},
1718    \c{"server"}, and \c{"system"}, which are mapped to the corresponding set of
1719    possible \c WINAPI_PARTITION_* preprocessor defines in the Windows SDK.
1720
1721    \defaultvalue Undefined, which lets the Windows SDK headers determine
1722    the default partitions based on the value of \c WINAPI_FAMILY.
1723
1724    \sa windowsApiFamily
1725*/
1726
1727/*!
1728    \qmlproperty bool cpp::requireAppContainer
1729    \since Qbs 1.10
1730
1731    \windowsproperty
1732
1733    Whether the generated executable or dynamic-link library \e requires an
1734    AppContainer execution environment. Set to \c true when creating
1735    Universal Windows Platform applications.
1736
1737    \nodefaultvalue
1738*/
1739
1740/*!
1741    \qmlproperty string cpp::minimumWindowsVersion
1742
1743    \windowsproperty
1744
1745    A version number in the format \c{[major].[minor]} indicating the earliest
1746    version of Windows that the product should run on.
1747
1748    Defines \c WINVER, \c _WIN32_WINNT, and \c _WIN32_WINDOWS, and applies a
1749    version number to the linker flags \c /SUBSYSTEM and \c /OSVERSION for
1750    MSVC or \c --major-subsystem-version, \c --minor-subsystem-version,
1751    \c --major-os-version, and \c --minor-os-version for MinGW.
1752
1753    If left undefined, compiler defaults will be used.
1754
1755    \nodefaultvalue
1756*/
1757
1758/*!
1759    \qmlproperty bool cpp::alwaysUseLipo
1760    \since Qbs 1.9
1761
1762    Whether to always use \c lipo when combining Mach-O output files on
1763    Apple platforms, even if there is only one CPU architecture. This value
1764    should not normally need to be changed.
1765
1766    \defaultvalue \c{false}
1767*/
1768
1769/*!
1770    \qmlproperty var cpp::compilerDefinesByLanguage
1771    \since Qbs 1.10
1772
1773    A \c{string} to \c{string} to \c{string} map of language tags to list of
1774    preprocessor macros that are used for all projects that are using the
1775    current toolchain.
1776
1777    User project files usually do not set this property.
1778
1779    \note This property will not be usable without also setting
1780    \l{cpp::}{enableCompilerDefinesByLanguage}.
1781
1782    \nodefaultvalue
1783*/
1784
1785/*!
1786    \qmlproperty pathList cpp::compilerIncludePaths
1787    \since Qbs 1.6
1788
1789    A list of \c #include search paths that are used for all projects that are
1790    using the current toolchain.
1791
1792    User project files usually do not set this property.
1793
1794    \defaultvalue Determined automatically by probing the compiler.
1795*/
1796
1797/*!
1798    \qmlproperty pathList cpp::compilerFrameworkPaths
1799    \since Qbs 1.6
1800
1801    A list of framework search paths that are used for all projects that are
1802    using the current toolchain.
1803
1804    User project files usually do not set this property.
1805
1806    \defaultvalue Determined automatically by probing the compiler.
1807*/
1808
1809/*!
1810    \qmlproperty pathList cpp::compilerLibraryPaths
1811    \since Qbs 1.6
1812
1813    A list of library search paths that are used for all projects that are using
1814    the current toolchain.
1815
1816    User project files usually do not set this property.
1817
1818    \defaultvalue Determined automatically by probing the compiler.
1819*/
1820
1821/*!
1822    \qmlproperty pathList cpp::distributionFrameworkPaths
1823    \since Qbs 1.8
1824
1825    A list of distribution-specific framework search paths, prioritized after
1826    \l{cpp::}{systemFrameworkPaths}.
1827
1828    Intended for use by module authors implementing support for new operating
1829    systems or distributions.
1830
1831    User project files should not set this property.
1832
1833    \nodefaultvalue
1834*/
1835
1836/*!
1837    \qmlproperty pathList cpp::distributionIncludePaths
1838    \since Qbs 1.8
1839
1840    A list of distribution-specific include paths that are passed as system
1841    include paths to the compiler, prioritized after
1842    \l{cpp::}{systemIncludePaths}.
1843
1844    Intended for use by module authors implementing support for new operating
1845    systems or distributions.
1846
1847    User project files should not set this property.
1848
1849    \nodefaultvalue
1850*/
1851
1852/*!
1853    \qmlproperty pathList cpp::distributionLibraryPaths
1854    \since Qbs 1.8
1855
1856    A list of distribution-specific library search paths.
1857
1858    Intended for use by module authors implementing support for new operating
1859    systems or distributions.
1860
1861    User project files should not set this property.
1862
1863    \nodefaultvalue
1864*/
1865
1866/*!
1867    \qmlproperty stringList cpp::enableCompilerDefinesByLanguage
1868    \since Qbs 1.10
1869
1870    A list of languages (one or more of \c{"c"}, \c{"cpp"}, \c{"objc"},
1871    \c{"objcpp"}) to extract the list of default compiler defines for in
1872    \l{cpp::}{compilerDefinesByLanguage}.
1873
1874    Because this has performance implications, no languages are enabled by
1875    default.
1876
1877    \nodefaultvalue
1878*/
1879
1880/*!
1881    \qmlproperty bool cpp::generateLinkerMapFile
1882    \since Qbs 1.13
1883
1884    Whether to auto-generate a linker map file.
1885
1886    \defaultvalue \c{false}
1887*/
1888
1889/*!
1890    \qmlproperty bool cpp::generateCompilerListingFiles
1891    \since Qbs 1.15
1892
1893    Whether to auto-generate compiler listing files.
1894
1895    \defaultvalue \c{false}
1896*/
1897
1898/*!
1899    \qmlproperty bool cpp::generateAssemblerListingFiles
1900    \since Qbs 1.15
1901
1902    \baremetalproperty
1903
1904    Whether to auto-generate an assembler listing files.
1905
1906    \defaultvalue \c{false}
1907*/
1908
1909/*!
1910    \qmlproperty bool cpp::removeDuplicateLibraries
1911    \since Qbs 1.16
1912
1913    Whether the list of the objects and libraries is reduced to a
1914    list of unique values before being passed to the linker.
1915
1916    \defaultvalue \c{true}
1917*/
1918
1919/*!
1920    \qmlproperty string cpp::windowsSdkVersion
1921    \since Qbs 1.19
1922
1923    Which Windows SDK version should be used with MSVC toolchain. By default,
1924    the latest SDK is used.
1925
1926    \windowsproperty
1927    \nodefaultvalue
1928*/
1929
1930/*!
1931    \qmlproperty string cpp::enableCxxLanguageMacro
1932    \since Qbs 1.20
1933
1934    Whether to set the \c{/Zc:__cplusplus} macro
1935    (\l{https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus})
1936
1937    This property only applies to MSVC toolchain. clang-cl also supports
1938    this option, but it has no effect.
1939
1940    \windowsproperty
1941    \defaultvalue \c{true} for MSVC, \c{false} for clang-cl
1942*/
1943