"Fossies" - the Fresh Open Source Software Archive

Member "cmake-3.6.2-win32-x86/share/cmake-3.6/Help/command/build_command.rst" (7 Sep 2016, 1673 Bytes) of archive /windows/misc/cmake-3.6.2-win32-x86.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.


Get a command line to build the current project. This is mainly intended for internal use by the :module:CTest module.

.. code-block:: cmake

build_command( [CONFIGURATION ] [TARGET ] [PROJECT_NAME ] # legacy, causes warning )

Sets the given <variable> to a command-line string of the form::

–build . [–config ] [–target ] [– -i]

where <cmake> is the location of the :manual:cmake(1) command-line tool, and <config> and <target> are the values provided to the CONFIGURATION and TARGET options, if any. The trailing -- -i option is added for :ref:Makefile Generators if policy :policy:CMP0061 is not set to NEW.

When invoked, this cmake --build command line will launch the underlying build system tool.

.. code-block:: cmake

build_command( )

This second signature is deprecated, but still available for backwards compatibility. Use the first signature instead.

It sets the given <cachevariable> to a command-line string as above but without the --target option. The <makecommand> is ignored but should be the full path to devenv, nmake, make or one of the end user build tools for legacy invocations.

.. note:: In CMake versions prior to 3.0 this command returned a command line that directly invokes the native build tool for the current generator. Their implementation of the PROJECT_NAME option had no useful effects, so CMake now warns on use of the option.