1CMAKE-ENV-VARIABLES(7)               CMake              CMAKE-ENV-VARIABLES(7)
2
3
4

NAME

6       cmake-env-variables - CMake Environment Variables Reference
7

ENVIRONMENT VARIABLES THAT CONTROL THE BUILD

9   CMAKE_CONFIG_TYPE
10       The  default  build  configuration  for Build Tool Mode and ctest build
11       handler when there is no explicit configuration given.
12
13   CMAKE_MSVCIDE_RUN_PATH
14       Extra PATH locations for custom commands when  using  Visual  Studio  9
15       2008 (or above) generators.
16
17       The  CMAKE_MSVCIDE_RUN_PATH environment variable sets the default value
18       for the CMAKE_MSVCIDE_RUN_PATH variable if not already explicitly set.
19
20   CMAKE_OSX_ARCHITECTURES
21       Target specific architectures for OS X.
22
23       The CMAKE_OSX_ARCHITECTURES environment variable sets the default value
24       for  the  CMAKE_OSX_ARCHITECTURES  variable.  See OSX_ARCHITECTURES for
25       more information.
26
27   LDFLAGS
28       Will only be used by CMake on the first configuration to determine  the
29       default  linker  flags,  after which the value for LDFLAGS is stored in
30       the           cache           as           CMAKE_EXE_LINKER_FLAGS_INIT,
31       CMAKE_SHARED_LINKER_FLAGS_INIT, and CMAKE_MODULE_LINKER_FLAGS_INIT. For
32       any configuration run (including the first), the  environment  variable
33       will be ignored if the equivalent  CMAKE_<TYPE>_LINKER_FLAGS_INIT vari‐
34       able is defined.
35
36   MACOSX_DEPLOYMENT_TARGET
37       Specify the minimum version of OS X on which the target binaries are to
38       be deployed.
39
40       The  MACOSX_DEPLOYMENT_TARGET  environment  variable  sets  the default
41       value for the CMAKE_OSX_DEPLOYMENT_TARGET variable.
42

ENVIRONMENT VARIABLES FOR LANGUAGES

44   ASM<DIALECT>
45       Preferred executable for compiling a specific dialect of assembly  lan‐
46       guage  files.  ASM<DIALECT>  can be ASM, ASM_NASM, ASM_MASM or ASM-ATT.
47       Will only be used by CMake on  the  first  configuration  to  determine
48       ASM<DIALECT> compiler, after which the value for ASM<DIALECT> is stored
49       in the cache as CMAKE_ASM<DIALECT>_COMPILER. For subsequent  configura‐
50       tion  runs,  the  environment  variable  will  be  ignored  in favor of
51       CMAKE_ASM<DIALECT>_COMPILER.
52
53   ASM<DIALECT>FLAGS
54       Default compilation flags to be used when compiling a specific  dialect
55       of  an  assembly language. ASM<DIALECT>FLAGS can be ASMFLAGS, ASM_NASM‐
56       FLAGS, ASM_MASMFLAGS or ASM-ATTFLAGS. Will only be used by CMake on the
57       first  configuration  to  determine  ASM<DIALECT>  default  compilation
58       flags, after which the value for ASM<DIALECT>FLAGS  is  stored  in  the
59       cache as CMAKE_ASM<DIALECT>_FLAGS. For any configuration run (including
60       the  first),  the  environment  variable  will  be   ignored   if   the
61       CMAKE_ASM<DIALECT>_FLAGS variable is defined.
62
63   CC
64       Preferred  executable for compiling C language files. Will only be used
65       by CMake on the first configuration  to  determine  C  compiler,  after
66       which  the value for CC is stored in the cache as CMAKE_C_COMPILER. For
67       any configuration run (including the first), the  environment  variable
68       will be ignored if the CMAKE_C_COMPILER variable is defined.
69
70   CFLAGS
71       Default  compilation flags to be used when compiling C files. Will only
72       be used by CMake on the first configuration  to  determine  CC  default
73       compilation  flags,  after  which the value for CFLAGS is stored in the
74       cache as  CMAKE_C_FLAGS.  For  any  configuration  run  (including  the
75       first),  the  environment variable will be ignored if the CMAKE_C_FLAGS
76       variable is defined.
77
78   CSFLAGS
79       Preferred executable for compiling CSharp language files. Will only  be
80       used  by  CMake  on the first configuration to determine CSharp default
81       compilation flags, after which the value for CSFLAGS is stored  in  the
82       cache  as  CMAKE_CSharp_FLAGS. For any configuration run (including the
83       first),   the   environment   variable   will   be   ignored   if   the
84       CMAKE_CSharp_FLAGS variable is defined.
85
86   CUDACXX
87       Preferred  executable  for  compiling CUDA language files. Will only be
88       used by CMake on the first configuration to  determine  CUDA  compiler,
89       after   which   the   value   for  CUDA  is  stored  in  the  cache  as
90       CMAKE_CUDA_COMPILER. For any configuration run (including  the  first),
91       the  environment  variable  will  be ignored if the CMAKE_CUDA_COMPILER
92       variable is defined.
93
94   CUDAFLAGS
95       Default compilation flags to be used when compiling  CUDA  files.  Will
96       only  be  used  by  CMake  on the first configuration to determine CUDA
97       default compilation flags, after  which  the  value  for  CUDAFLAGS  is
98       stored  in  the  cache  as  CMAKE_CUDA_FLAGS. For any configuration run
99       (including the first), the environment variable will be ignored if  the
100       CMAKE_CUDA_FLAGS variable is defined.
101
102   CUDAHOSTCXX
103       Preferred  executable  for compiling host code when compiling CUDA lan‐
104       guage files. Will only be used by CMake on the first  configuration  to
105       determine  CUDA host compiler, after which the value for CUDAHOSTCXX is
106       stored in the cache as CMAKE_CUDA_HOST_COMPILER. For any  configuration
107       run  (including the first), the environment variable will be ignored if
108       the CMAKE_CUDA_HOST_COMPILER variable is defined.
109
110   CXX
111       Preferred executable for compiling CXX language  files.  Will  only  be
112       used  by  CMake  on  the first configuration to determine CXX compiler,
113       after which the value for CXX is stored in the cache as  CMAKE_CXX_COM‐
114       PILER. For any configuration run (including the first), the environment
115       variable will be ignored if the CMAKE_CXX_COMPILER variable is defined.
116
117   CXXFLAGS
118       Default compilation flags to be used when compiling  CXX  (C++)  files.
119       Will  only be used by CMake on the first configuration to determine CXX
120       default compilation flags, after which the value for CXXFLAGS is stored
121       in  the cache as CMAKE_CXX_FLAGS. For any configuration run ( including
122       the  first),  the  environment  variable  will  be   ignored   if   the
123       CMAKE_CXX_FLAGS variable is defined.
124
125   FC
126       Preferred executable for compiling Fortran language files. Will only be
127       used by CMake on the first configuration to determine Fortran compiler,
128       after  which the value for Fortran is stored in the cache as CMAKE_For‐
129       tran_COMPILER. For any configuration run  (including  the  first),  the
130       environment  variable  will  be  ignored  if the CMAKE_Fortran_COMPILER
131       variable is defined.
132
133   FFLAGS
134       Default compilation flags to be used when compiling Fortran files. Will
135       only  be  used by CMake on the first configuration to determine Fortran
136       default compilation flags, after which the value for FFLAGS  is  stored
137       in the cache as CMAKE_Fortran_FLAGS. For any configuration run (includ‐
138       ing the first),  the  environment  variable  will  be  ignored  if  the
139       CMAKE_Fortran_FLAGS variable is defined.
140
141   RC
142       Preferred executable for compiling resource files. Will only be used by
143       CMake on the first configuration to determine resource compiler,  after
144       which the value for RC is stored in the cache as CMAKE_RC_COMPILER. For
145       any configuration run (including the first), the  environment  variable
146       will be ignored if the CMAKE_RC_COMPILER variable is defined.
147
148   RCFLAGS
149       Default  compilation  flags  to  be used when compiling resource files.
150       Will only be used by CMake on  the  first  configuration  to  determine
151       resource  default  compilation flags, after which the value for RCFLAGS
152       is stored in the cache as CMAKE_RC_FLAGS.  For  any  configuration  run
153       (including  the first), the environment variable will be ignored if the
154       CMAKE_RC_FLAGS variable is defined.
155

ENVIRONMENT VARIABLES FOR CTEST

157   CTEST_INTERACTIVE_DEBUG_MODE
158       Environment variable that will exist and be set to 1 when a  test  exe‐
159       cuted by CTest is run in interactive mode.
160
161   CTEST_OUTPUT_ON_FAILURE
162       Boolean  environment  variable  that  controls  if the output should be
163       logged for failed tests. Set the value to 1, True, or ON to enable out‐
164       put  on failure.  See ctest(1) for more information on controlling out‐
165       put of failed tests.
166
167   CTEST_PARALLEL_LEVEL
168       Specify the number of tests for CTest to run in parallel. See  ctest(1)
169       for more information on parallel test execution.
170
171   CTEST_USE_LAUNCHERS_DEFAULT
172       Initializes the CTEST_USE_LAUNCHERS variable if not already defined.
173
174   DASHBOARD_TEST_FROM_CTEST
175       Environment  variable  that will exist when a test executed by CTest is
176       run in non-interactive mode. The value will be equal to CMAKE_VERSION.
177
179       2000-2018 Kitware, Inc. and Contributors
180
181
182
183
1843.11.4                           May 13, 2019           CMAKE-ENV-VARIABLES(7)
Impressum