ctest_build.rst 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ctest_build
  2. -----------
  3. Perform the :ref:`CTest Build Step` as a :ref:`Dashboard Client`.
  4. ::
  5. ctest_build([BUILD <build-dir>] [APPEND]
  6. [CONFIGURATION <config>]
  7. [FLAGS <flags>]
  8. [PROJECT_NAME <project-name>]
  9. [TARGET <target-name>]
  10. [NUMBER_ERRORS <num-err-var>]
  11. [NUMBER_WARNINGS <num-warn-var>]
  12. [RETURN_VALUE <result-var>]
  13. )
  14. Build the project and store results in ``Build.xml``
  15. for submission with the :command:`ctest_submit` command.
  16. The :variable:`CTEST_BUILD_COMMAND` variable may be set to explicitly
  17. specify the build command line. Otherwise the build command line is
  18. computed automatically based on the options given.
  19. The options are:
  20. ``BUILD <build-dir>``
  21. Specify the top-level build directory. If not given, the
  22. :variable:`CTEST_BINARY_DIRECTORY` variable is used.
  23. ``APPEND``
  24. Mark results for append to those previously submitted to a
  25. dashboard server since the last :command:`ctest_start` call.
  26. Append semantics are defined by the dashboard server in use.
  27. ``CONFIGURATION <config>``
  28. Specify the build configuration (e.g. ``Debug``). If not
  29. specified the ``CTEST_BUILD_CONFIGURATION`` variable will be checked.
  30. Otherwise the ``-C <cfg>`` option given to the :manual:`ctest(1)`
  31. command will be used, if any.
  32. ``FLAGS <flags>``
  33. Pass additional arguments to the underlying build command.
  34. If not specified the ``CTEST_BUILD_FLAGS`` variable will be checked.
  35. This can, e.g., be used to trigger a parallel build using the
  36. ``-j`` option of make. See the :module:`ProcessorCount` module
  37. for an example.
  38. ``PROJECT_NAME <project-name>``
  39. Set the name of the project to build. This should correspond
  40. to the top-level call to the :command:`project` command.
  41. If not specified the ``CTEST_PROJECT_NAME`` variable will be checked.
  42. ``TARGET <target-name>``
  43. Specify the name of a target to build. If not specified the
  44. ``CTEST_BUILD_TARGET`` variable will be checked. Otherwise the
  45. default target will be built. This is the "all" target
  46. (called ``ALL_BUILD`` in :ref:`Visual Studio Generators`).
  47. ``NUMBER_ERRORS <num-err-var>``
  48. Store the number of build errors detected in the given variable.
  49. ``NUMBER_WARNINGS <num-warn-var>``
  50. Store the number of build warnings detected in the given variable.
  51. ``RETURN_VALUE <result-var>``
  52. Store the return value of the native build tool in the given variable.
  53. ``QUIET``
  54. Suppress any CTest-specific non-error output that would have been
  55. printed to the console otherwise. The summary of warnings / errors,
  56. as well as the output from the native build tool is unaffected by
  57. this option.