cmake/Help/variable/CMAKE_LANG_COMPILER.rst

34 lines
852 B
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
CMAKE_<LANG>_COMPILER
---------------------
2015-11-17 17:22:37 +01:00
The full path to the compiler for ``LANG``.
2014-08-03 19:52:23 +02:00
2015-11-17 17:22:37 +01:00
This is the command that will be used as the ``<LANG>`` compiler. Once
2014-08-03 19:52:23 +02:00
set, you can not change this variable.
2021-09-14 00:13:48 +02:00
Usage
^^^^^
This variable can be set by the user during the first time a build tree is configured.
If a non-full path value is supplied then CMake will resolve the full path of
the compiler.
2022-11-16 20:14:03 +01:00
The variable could be set in a user supplied toolchain file or via
:option:`-D <cmake -D>` on the command line.
2021-09-14 00:13:48 +02:00
.. note::
Options that are required to make the compiler work correctly can be included
as items in a list; they can not be changed.
.. code-block:: cmake
#set within user supplied toolchain file
set(CMAKE_C_COMPILER /full/path/to/qcc --arg1 --arg2)
or
.. code-block:: console
$ cmake ... -DCMAKE_C_COMPILER='qcc;--arg1;--arg2'