Perform the CTest Build Step as a Dashboard Client.
ctest_build([BUILD <build-dir>] [APPEND]
[CONFIGURATION <config>]
[FLAGS <flags>]
[PROJECT_NAME <project-name>]
[TARGET <target-name>]
[NUMBER_ERRORS <num-err-var>]
[NUMBER_WARNINGS <num-warn-var>]
[RETURN_VALUE <result-var>]
[CAPTURE_CMAKE_ERROR <result-var>]
)
Build the project and store results in Build.xml for submission with the ctest_submit() command.
The CTEST_BUILD_COMMAND variable may be set to explicitly specify the build command line. Otherwise the build command line is computed automatically based on the options given.
The options are:
BUILD <build-dir> CTEST_BINARY_DIRECTORY variable is used.APPEND Build.xml for append to results previously submitted to a dashboard server since the last ctest_start() call. Append semantics are defined by the dashboard server in use. This does not cause results to be appended to a .xml file produced by a previous call to this command.CONFIGURATION <config> Debug). If not specified the CTEST_BUILD_CONFIGURATION variable will be checked. Otherwise the -C <cfg> option given to the ctest(1) command will be used, if any.FLAGS <flags> CTEST_BUILD_FLAGS variable will be checked. This can, e.g., be used to trigger a parallel build using the -j option of make. See the ProcessorCount module for an example.PROJECT_NAME <project-name> project() command. If not specified the CTEST_PROJECT_NAME variable will be checked.TARGET <target-name> CTEST_BUILD_TARGET variable will be checked. Otherwise the default target will be built. This is the “all” target (called ALL_BUILD in Visual Studio Generators).NUMBER_ERRORS <num-err-var> NUMBER_WARNINGS <num-warn-var> RETURN_VALUE <result-var> CAPTURE_CMAKE_ERROR <result-var> <result-var> variable -1 if there are any errors running the command and prevent ctest from returning non-zero if an error occurs.QUIET
© 2000–2018 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.12/command/ctest_build.html