build_command.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. build_command
  2. -------------
  3. Get the command line to build this project.
  4. ::
  5. build_command(<variable>
  6. [CONFIGURATION <config>]
  7. [PROJECT_NAME <projname>]
  8. [TARGET <target>])
  9. Sets the given <variable> to a string containing the command line for
  10. building one configuration of a target in a project using the build
  11. tool appropriate for the current CMAKE_GENERATOR.
  12. If CONFIGURATION is omitted, CMake chooses a reasonable default value
  13. for multi-configuration generators. CONFIGURATION is ignored for
  14. single-configuration generators.
  15. If PROJECT_NAME is omitted, the resulting command line will build the
  16. top level PROJECT in the current build tree.
  17. If TARGET is omitted, the resulting command line will build
  18. everything, effectively using build target 'all' or 'ALL_BUILD'.
  19. ::
  20. build_command(<cachevariable> <makecommand>)
  21. This second signature is deprecated, but still available for backwards
  22. compatibility. Use the first signature instead.
  23. Sets the given <cachevariable> to a string containing the command to
  24. build this project from the root of the build tree using the build
  25. tool given by <makecommand>. <makecommand> should be the full path to
  26. msdev, devenv, nmake, make or one of the end user build tools.