mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 19:43:23 +08:00
Help: Document CMake's environment variables
This commit is contained in:
11
Help/envvar/ASM_DIALECT.rst
Normal file
11
Help/envvar/ASM_DIALECT.rst
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
ASM<DIALECT>
|
||||||
|
------------
|
||||||
|
|
||||||
|
Preferred executable for compiling a specific dialect of assembly language
|
||||||
|
files. ``ASM<DIALECT>`` can be ``ASM``, ``ASM_NASM``, ``ASM_MASM`` or
|
||||||
|
``ASM-ATT``. Will only be used by CMake on the first configuration to determine
|
||||||
|
``ASM<DIALECT>`` compiler, after which the value for ``ASM<DIALECT>`` is stored
|
||||||
|
in the cache as
|
||||||
|
:variable:`CMAKE_ASM<DIALECT>_COMPILER <CMAKE_<LANG>_COMPILER>`. For subsequent
|
||||||
|
configuration runs, the environment variable will be ignored in favor of
|
||||||
|
:variable:`CMAKE_ASM<DIALECT>_COMPILER <CMAKE_<LANG>_COMPILER>`.
|
11
Help/envvar/ASM_DIALECTFLAGS.rst
Normal file
11
Help/envvar/ASM_DIALECTFLAGS.rst
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
ASM<DIALECT>FLAGS
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Default compilation flags to be used when compiling a specific dialect of an
|
||||||
|
assembly language. ``ASM<DIALECT>FLAGS`` can be ``ASMFLAGS``, ``ASM_NASMFLAGS``,
|
||||||
|
``ASM_MASMFLAGS`` or ``ASM-ATTFLAGS``. Will only be used by CMake on the
|
||||||
|
first configuration to determine ``ASM<DIALECT>`` default compilation flags, after
|
||||||
|
which the value for ``ASM<DIALECT>FLAGS`` is stored in the cache as
|
||||||
|
:variable:`CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
|
||||||
|
run (including the first), the environment variable will be ignored if the
|
||||||
|
:variable:`CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
9
Help/envvar/CC.rst
Normal file
9
Help/envvar/CC.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CC
|
||||||
|
--
|
||||||
|
|
||||||
|
Preferred executable for compiling ``C`` language files. Will only be used by
|
||||||
|
CMake on the first configuration to determine ``C`` compiler, after which the
|
||||||
|
value for ``CC`` is stored in the cache as
|
||||||
|
:variable:`CMAKE_C_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration run
|
||||||
|
(including the first), the environment variable will be ignored if the
|
||||||
|
:variable:`CMAKE_C_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
|
9
Help/envvar/CFLAGS.rst
Normal file
9
Help/envvar/CFLAGS.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CFLAGS
|
||||||
|
------
|
||||||
|
|
||||||
|
Default compilation flags to be used when compiling ``C`` files. Will only be
|
||||||
|
used by CMake on the first configuration to determine ``CC`` default compilation
|
||||||
|
flags, after which the value for ``CFLAGS`` is stored in the cache
|
||||||
|
as :variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration run
|
||||||
|
(including the first), the environment variable will be ignored if the
|
||||||
|
:variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
5
Help/envvar/CMAKE_CONFIG_TYPE.rst
Normal file
5
Help/envvar/CMAKE_CONFIG_TYPE.rst
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
CMAKE_CONFIG_TYPE
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
The default build configuration for :ref:`Build Tool Mode` and
|
||||||
|
``ctest`` build handler when there is no explicit configuration given.
|
8
Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst
Normal file
8
Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
CMAKE_MSVCIDE_RUN_PATH
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Extra PATH locations for custom commands when using
|
||||||
|
:generator:`Visual Studio 9 2008` (or above) generators.
|
||||||
|
|
||||||
|
The ``CMAKE_MSVCIDE_RUN_PATH`` environment variable sets the default value for
|
||||||
|
the :variable:`CMAKE_MSVCIDE_RUN_PATH` variable if not already explicitly set.
|
8
Help/envvar/CMAKE_OSX_ARCHITECTURES.rst
Normal file
8
Help/envvar/CMAKE_OSX_ARCHITECTURES.rst
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
CMAKE_OSX_ARCHITECTURES
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Target specific architectures for OS X.
|
||||||
|
|
||||||
|
The ``CMAKE_OSX_ARCHITECTURES`` environment variable sets the default value for
|
||||||
|
the :variable:`CMAKE_OSX_ARCHITECTURES` variable. See
|
||||||
|
:prop_tgt:`OSX_ARCHITECTURES` for more information.
|
9
Help/envvar/CSFLAGS.rst
Normal file
9
Help/envvar/CSFLAGS.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CSFLAGS
|
||||||
|
-------
|
||||||
|
|
||||||
|
Preferred executable for compiling ``CSharp`` language files. Will only be
|
||||||
|
used by CMake on the first configuration to determine ``CSharp`` default
|
||||||
|
compilation flags, after which the value for ``CSFLAGS`` is stored in the cache
|
||||||
|
as :variable:`CMAKE_CSharp_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
|
||||||
|
run (including the first), the environment variable will be ignored if the
|
||||||
|
:variable:`CMAKE_CSharp_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
5
Help/envvar/CTEST_INTERACTIVE_DEBUG_MODE.rst
Normal file
5
Help/envvar/CTEST_INTERACTIVE_DEBUG_MODE.rst
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
CTEST_INTERACTIVE_DEBUG_MODE
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Environment variable that will exist and be set to ``1`` when a test executed
|
||||||
|
by CTest is run in interactive mode.
|
7
Help/envvar/CTEST_OUTPUT_ON_FAILURE.rst
Normal file
7
Help/envvar/CTEST_OUTPUT_ON_FAILURE.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
CTEST_OUTPUT_ON_FAILURE
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Boolean environment variable that controls if the output should be logged for
|
||||||
|
failed tests. Set the value to 1, True, or ON to enable output on failure.
|
||||||
|
See :manual:`ctest(1)` for more information on controlling output of failed
|
||||||
|
tests.
|
5
Help/envvar/CTEST_PARALLEL_LEVEL.rst
Normal file
5
Help/envvar/CTEST_PARALLEL_LEVEL.rst
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
CTEST_PARALLEL_LEVEL
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Specify the number of tests for CTest to run in parallel. See :manual:`ctest(1)`
|
||||||
|
for more information on parallel test execution.
|
4
Help/envvar/CTEST_USE_LAUNCHERS_DEFAULT.rst
Normal file
4
Help/envvar/CTEST_USE_LAUNCHERS_DEFAULT.rst
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
CTEST_USE_LAUNCHERS_DEFAULT
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
Initializes the :variable:`CTEST_USE_LAUNCHERS` variable if not already defined.
|
9
Help/envvar/CUDACXX.rst
Normal file
9
Help/envvar/CUDACXX.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CUDACXX
|
||||||
|
-------
|
||||||
|
|
||||||
|
Preferred executable for compiling ``CUDA`` language files. Will only be used by
|
||||||
|
CMake on the first configuration to determine ``CUDA`` compiler, after which the
|
||||||
|
value for ``CUDA`` is stored in the cache as
|
||||||
|
:variable:`CMAKE_CUDA_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration
|
||||||
|
run (including the first), the environment variable will be ignored if the
|
||||||
|
:variable:`CMAKE_CUDA_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
|
9
Help/envvar/CUDAFLAGS.rst
Normal file
9
Help/envvar/CUDAFLAGS.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CUDAFLAGS
|
||||||
|
---------
|
||||||
|
|
||||||
|
Default compilation flags to be used when compiling ``CUDA`` files. Will only be
|
||||||
|
used by CMake on the first configuration to determine ``CUDA`` default
|
||||||
|
compilation flags, after which the value for ``CUDAFLAGS`` is stored in the
|
||||||
|
cache as :variable:`CMAKE_CUDA_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
|
||||||
|
run (including the first), the environment variable will be ignored if
|
||||||
|
the :variable:`CMAKE_CUDA_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
9
Help/envvar/CUDAHOSTCXX.rst
Normal file
9
Help/envvar/CUDAHOSTCXX.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CUDAHOSTCXX
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Preferred executable for compiling host code when compiling ``CUDA``
|
||||||
|
language files. Will only be used by CMake on the first configuration to
|
||||||
|
determine ``CUDA`` host compiler, after which the value for ``CUDAHOSTCXX`` is
|
||||||
|
stored in the cache as :variable:`CMAKE_CUDA_HOST_COMPILER`. For any
|
||||||
|
configuration run (including the first), the environment variable will be
|
||||||
|
ignored if the :variable:`CMAKE_CUDA_HOST_COMPILER` variable is defined.
|
9
Help/envvar/CXX.rst
Normal file
9
Help/envvar/CXX.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CXX
|
||||||
|
---
|
||||||
|
|
||||||
|
Preferred executable for compiling ``CXX`` language files. Will only be used by
|
||||||
|
CMake on the first configuration to determine ``CXX`` compiler, after which the
|
||||||
|
value for ``CXX`` is stored in the cache as
|
||||||
|
:variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration
|
||||||
|
run (including the first), the environment variable will be ignored if the
|
||||||
|
:variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
|
9
Help/envvar/CXXFLAGS.rst
Normal file
9
Help/envvar/CXXFLAGS.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CXXFLAGS
|
||||||
|
--------
|
||||||
|
|
||||||
|
Default compilation flags to be used when compiling ``CXX`` (C++) files. Will
|
||||||
|
only be used by CMake on the first configuration to determine ``CXX`` default
|
||||||
|
compilation flags, after which the value for ``CXXFLAGS`` is stored in the cache
|
||||||
|
as :variable:`CMAKE_CXX_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration run (
|
||||||
|
including the first), the environment variable will be ignored if
|
||||||
|
the :variable:`CMAKE_CXX_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
5
Help/envvar/DASHBOARD_TEST_FROM_CTEST.rst
Normal file
5
Help/envvar/DASHBOARD_TEST_FROM_CTEST.rst
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
DASHBOARD_TEST_FROM_CTEST
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Environment variable that will exist when a test executed by CTest is run
|
||||||
|
in non-interactive mode. The value will be equal to :variable:`CMAKE_VERSION`.
|
10
Help/envvar/FC.rst
Normal file
10
Help/envvar/FC.rst
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FC
|
||||||
|
--
|
||||||
|
|
||||||
|
Preferred executable for compiling ``Fortran`` language files. Will only be used
|
||||||
|
by CMake on the first configuration to determine ``Fortran`` compiler, after
|
||||||
|
which the value for ``Fortran`` is stored in the cache as
|
||||||
|
:variable:`CMAKE_Fortran_COMPILER <CMAKE_<LANG>_COMPILER>`. For any
|
||||||
|
configuration run (including the first), the environment variable will be
|
||||||
|
ignored if the :variable:`CMAKE_Fortran_COMPILER <CMAKE_<LANG>_COMPILER>`
|
||||||
|
variable is defined.
|
9
Help/envvar/FFLAGS.rst
Normal file
9
Help/envvar/FFLAGS.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
FFLAGS
|
||||||
|
------
|
||||||
|
|
||||||
|
Default compilation flags to be used when compiling ``Fortran`` files. Will only
|
||||||
|
be used by CMake on the first configuration to determine ``Fortran`` default
|
||||||
|
compilation flags, after which the value for ``FFLAGS`` is stored in the cache
|
||||||
|
as :variable:`CMAKE_Fortran_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
|
||||||
|
run (including the first), the environment variable will be ignored if
|
||||||
|
the :variable:`CMAKE_Fortran_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
10
Help/envvar/LDFLAGS.rst
Normal file
10
Help/envvar/LDFLAGS.rst
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
LDFLAGS
|
||||||
|
-------
|
||||||
|
|
||||||
|
Will only be used by CMake on the first configuration to determine the default
|
||||||
|
linker flags, after which the value for ``LDFLAGS`` is stored in the cache
|
||||||
|
as :variable:`CMAKE_EXE_LINKER_FLAGS_INIT`,
|
||||||
|
:variable:`CMAKE_SHARED_LINKER_FLAGS_INIT`, and
|
||||||
|
:variable:`CMAKE_MODULE_LINKER_FLAGS_INIT`. For any configuration run
|
||||||
|
(including the first), the environment variable will be ignored if the
|
||||||
|
equivalent ``CMAKE_<TYPE>_LINKER_FLAGS_INIT`` variable is defined.
|
8
Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst
Normal file
8
Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
MACOSX_DEPLOYMENT_TARGET
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Specify the minimum version of OS X on which the target binaries are
|
||||||
|
to be deployed.
|
||||||
|
|
||||||
|
The ``MACOSX_DEPLOYMENT_TARGET`` environment variable sets the default value for
|
||||||
|
the :variable:`CMAKE_OSX_DEPLOYMENT_TARGET` variable.
|
9
Help/envvar/RC.rst
Normal file
9
Help/envvar/RC.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
RC
|
||||||
|
--
|
||||||
|
|
||||||
|
Preferred executable for compiling ``resource`` files. Will only be used by CMake
|
||||||
|
on the first configuration to determine ``resource`` compiler, after which the
|
||||||
|
value for ``RC`` is stored in the cache as
|
||||||
|
:variable:`CMAKE_RC_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration run
|
||||||
|
(including the first), the environment variable will be ignored if the
|
||||||
|
:variable:`CMAKE_RC_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
|
9
Help/envvar/RCFLAGS.rst
Normal file
9
Help/envvar/RCFLAGS.rst
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
RCFLAGS
|
||||||
|
-------
|
||||||
|
|
||||||
|
Default compilation flags to be used when compiling ``resource`` files. Will
|
||||||
|
only be used by CMake on the first configuration to determine ``resource``
|
||||||
|
default compilation flags, after which the value for ``RCFLAGS`` is stored in
|
||||||
|
the cache as :variable:`CMAKE_RC_FLAGS <CMAKE_<LANG>_FLAGS>`. For any
|
||||||
|
configuration run (including the first), the environment variable will be ignored
|
||||||
|
if the :variable:`CMAKE_RC_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
@@ -40,6 +40,7 @@ Reference Manuals
|
|||||||
/manual/cmake-qt.7
|
/manual/cmake-qt.7
|
||||||
/manual/cmake-toolchains.7
|
/manual/cmake-toolchains.7
|
||||||
/manual/cmake-variables.7
|
/manual/cmake-variables.7
|
||||||
|
/manual/cmake-env-variables.7
|
||||||
|
|
||||||
.. only:: html or text
|
.. only:: html or text
|
||||||
|
|
||||||
|
54
Help/manual/cmake-env-variables.7.rst
Normal file
54
Help/manual/cmake-env-variables.7.rst
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
.. cmake-manual-description: CMake Environment Variables Reference
|
||||||
|
|
||||||
|
cmake-env-variables(7)
|
||||||
|
**********************
|
||||||
|
|
||||||
|
.. only:: html
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
Environment Variables that Control the Build
|
||||||
|
============================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
/envvar/CMAKE_CONFIG_TYPE
|
||||||
|
/envvar/CMAKE_MSVCIDE_RUN_PATH
|
||||||
|
/envvar/CMAKE_OSX_ARCHITECTURES
|
||||||
|
/envvar/LDFLAGS
|
||||||
|
/envvar/MACOSX_DEPLOYMENT_TARGET
|
||||||
|
|
||||||
|
Environment Variables for Languages
|
||||||
|
===================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
/envvar/ASM_DIALECT
|
||||||
|
/envvar/ASM_DIALECTFLAGS
|
||||||
|
/envvar/CC
|
||||||
|
/envvar/CFLAGS
|
||||||
|
/envvar/CSFLAGS
|
||||||
|
/envvar/CUDACXX
|
||||||
|
/envvar/CUDAFLAGS
|
||||||
|
/envvar/CUDAHOSTCXX
|
||||||
|
/envvar/CXX
|
||||||
|
/envvar/CXXFLAGS
|
||||||
|
/envvar/FC
|
||||||
|
/envvar/FFLAGS
|
||||||
|
/envvar/RC
|
||||||
|
/envvar/RCFLAGS
|
||||||
|
|
||||||
|
Environment Variables for CTest
|
||||||
|
===============================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
/envvar/CMAKE_CONFIG_TYPE
|
||||||
|
/envvar/CTEST_INTERACTIVE_DEBUG_MODE
|
||||||
|
/envvar/CTEST_OUTPUT_ON_FAILURE
|
||||||
|
/envvar/CTEST_PARALLEL_LEVEL
|
||||||
|
/envvar/CTEST_USE_LAUNCHERS_DEFAULT
|
||||||
|
/envvar/DASHBOARD_TEST_FROM_CTEST
|
@@ -366,6 +366,7 @@ Variables for Languages
|
|||||||
/variable/CMAKE_COMPILER_IS_GNUCC
|
/variable/CMAKE_COMPILER_IS_GNUCC
|
||||||
/variable/CMAKE_COMPILER_IS_GNUCXX
|
/variable/CMAKE_COMPILER_IS_GNUCXX
|
||||||
/variable/CMAKE_COMPILER_IS_GNUG77
|
/variable/CMAKE_COMPILER_IS_GNUG77
|
||||||
|
/variable/CMAKE_CUDA_HOST_COMPILER
|
||||||
/variable/CMAKE_CUDA_EXTENSIONS
|
/variable/CMAKE_CUDA_EXTENSIONS
|
||||||
/variable/CMAKE_CUDA_STANDARD
|
/variable/CMAKE_CUDA_STANDARD
|
||||||
/variable/CMAKE_CUDA_STANDARD_REQUIRED
|
/variable/CMAKE_CUDA_STANDARD_REQUIRED
|
||||||
|
@@ -138,6 +138,8 @@ Options
|
|||||||
|
|
||||||
.. include:: OPTIONS_HELP.txt
|
.. include:: OPTIONS_HELP.txt
|
||||||
|
|
||||||
|
.. _`Build Tool Mode`:
|
||||||
|
|
||||||
Build Tool Mode
|
Build Tool Mode
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
7
Help/variable/CMAKE_CUDA_HOST_COMPILER.rst
Normal file
7
Help/variable/CMAKE_CUDA_HOST_COMPILER.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
CMAKE_CUDA_HOST_COMPILER
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Executable to use when compiling host code when compiling ``CUDA`` language
|
||||||
|
files. Maps to the nvcc -ccbin option. Will only be used by CMake on the first
|
||||||
|
configuration to determine a valid host compiler for ``CUDA``. After a valid
|
||||||
|
host compiler has been found, this value is read-only.
|
Reference in New Issue
Block a user