mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
project: Add optional LANGUAGES keyword
Teach the project() command to recognize an optional "LANGUAGES" keyword after the project name and prior to the list of languages. Do not allow multiple copies of the keyword. If the keyword is specified and no languages are listed, imply NONE.
This commit is contained in:
@@ -5,7 +5,7 @@ Set a name and enable languages for the entire project.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
project(<PROJECT-NAME> [<language-name>...])
|
||||
project(<PROJECT-NAME> [LANGUAGES] [<language-name>...])
|
||||
|
||||
Sets the name of the project and stores the name in the
|
||||
:variable:`PROJECT_NAME` variable. Additionally this sets variables
|
||||
@@ -18,7 +18,8 @@ Sets the name of the project and stores the name in the
|
||||
Optionally you can specify which languages your project supports.
|
||||
Example languages are ``C``, ``CXX`` (i.e. C++), ``Fortran``, etc.
|
||||
By default ``C`` and ``CXX`` are enabled if no language options are
|
||||
given. Specify language ``NONE`` to skip enabling any languages.
|
||||
given. Specify language ``NONE``, or use the ``LANGUAGES`` keyword
|
||||
and list no languages, to skip enabling any languages.
|
||||
|
||||
If a variable exists called :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`,
|
||||
the file pointed to by that variable will be included as the last step of the
|
||||
|
||||
Reference in New Issue
Block a user