To build applications from the command line, enter the following commands:
cd examples/collidingmice qbs
By default, Qbs uses all the CPU cores available to achieve maximum build parallelization. To explicitly specify the number of concurrent jobs, use the
-j option. For example, to run 4 concurrent jobs, enter the following command:
The application is built using the default build profile that is set up in your Qbs configuration.
You can use the config command to set the max number of jobs per profile. For example, to set four jobs as the default option for a profile named Android, enter the following command:
qbs config profiles.Android.preferences.jobs 4
To build with other profiles than the default one, specify options for the build command. For example, to build debug and release configurations with the Android profile, enter the following command:
qbs build profile:Android debug release
The position of the property assignment is important. In the example above, the profile property is set for all build configurations that come afterwards.
To set a property just for one build configuration, place the assignment after the build configuration name. In the following example, the property cpp.treatWarningsAsErrors is set to
true for debug only and cpp.optimization is set to
small for release only.
qbs build debug modules.cpp.treatWarningsAsErrors:true release modules.cpp.optimization:small
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.