CMAKE-ENV-VARIABLES(7) CMake CMAKE-ENV-VARIABLES(7)
NAME
cmake-env-variables - CMake Environment Variables Reference
This page lists environment variables that have special meaning to
CMake.
For general information on environment variables, see the Environment
Variables section in the cmake-language manual.
ENVIRONMENT VARIABLES THAT CHANGE BEHAVIOR
CMAKE_PREFIX_PATH
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The CMAKE_PREFIX_PATH environment variable may be set to a list of di-
rectories specifying installation prefixes to be searched by the
find_package(), find_program(), find_library(), find_file(), and
find_path() commands. Each command will add appropriate subdirectories
(like bin, lib, or include) as specified in its own documentation.
This variable may hold a single prefix or a list of prefixes separated
by : on UNIX or ; on Windows (the same as the PATH environment variable
convention on those platforms).
See also the CMAKE_PREFIX_PATH CMake variable.
ENVIRONMENT VARIABLES THAT CONTROL THE BUILD
CMAKE_BUILD_PARALLEL_LEVEL
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Specifies the maximum number of concurrent processes to use when build-
ing using the cmake --build command line Build Tool Mode.
If this variable is defined empty the native build tools default number
is used.
CMAKE_CONFIG_TYPE
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The default build configuration for Build Tool Mode and ctest build
handler when there is no explicit configuration given.
CMAKE_EXPORT_COMPILE_COMMANDS
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The default value for CMAKE_EXPORT_COMPILE_COMMANDS when there is no
explicit configuration given on the first run while creating a new
build tree. On later runs in an existing build tree the value persists
in the cache as CMAKE_EXPORT_COMPILE_COMMANDS.
CMAKE_GENERATOR
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Specifies the CMake default generator to use when no generator is sup-
plied with -G. If the provided value doesnt name a generator known by
CMake, the internal default is used. Either way the resulting genera-
tor selection is stored in the CMAKE_GENERATOR variable.
Some generators may be additionally configured using the environment
variables:
o CMAKE_GENERATOR_PLATFORM
o CMAKE_GENERATOR_TOOLSET
o CMAKE_GENERATOR_INSTANCE
CMAKE_GENERATOR_INSTANCE
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_INSTANCE if no Cache entry is
present. This value is only applied if CMAKE_GENERATOR is set.
CMAKE_GENERATOR_PLATFORM
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_PLATFORM if no Cache entry is present
and no value is specified by cmake(1) -A option. This value is only
applied if CMAKE_GENERATOR is set.
CMAKE_GENERATOR_TOOLSET
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_TOOLSET if no Cache entry is present
and no value is specified by cmake(1) -T option. This value is only
applied if CMAKE_GENERATOR is set.
CMAKE_<LANG>_COMPILER_LAUNCHER
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default compiler launcher to use for the specified language. Will only
be used by CMake to initialize the variable on the first configuration.
Afterwards, it is available through the cache setting of the variable
of the same name. For any configuration run (including the first), the
environment variable will be ignored if the CMAKE_<LANG>_COM-
PILER_LAUNCHER variable is defined.
CMAKE_MSVCIDE_RUN_PATH
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Extra PATH locations for custom commands when using Visual Studio 9
2008 (or above) generators.
The CMAKE_MSVCIDE_RUN_PATH environment variable sets the default value
for the CMAKE_MSVCIDE_RUN_PATH variable if not already explicitly set.
CMAKE_NO_VERBOSE
Disables verbose output from CMake when VERBOSE environment variable is
set.
Only your build tool of choice will still print verbose output when you
start to actually build your project.
CMAKE_OSX_ARCHITECTURES
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Target specific architectures for macOS.
The CMAKE_OSX_ARCHITECTURES environment variable sets the default value
for the CMAKE_OSX_ARCHITECTURES variable. See OSX_ARCHITECTURES for
more information.
DESTDIR
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
On UNIX one can use the DESTDIR mechanism in order to relocate the
whole installation. DESTDIR means DESTination DIRectory. It is com-
monly used by makefile users in order to install software at non-de-
fault location. It is usually invoked like this:
make DESTDIR=/home/john install
which will install the concerned software using the installation pre-
fix, e.g. /usr/local prepended with the DESTDIR value which finally
gives /home/john/usr/local.
WARNING: DESTDIR may not be used on Windows because installation prefix
usually contains a drive letter like in C:/Program Files which cannot
be prepended with some other prefix.
LDFLAGS
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
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 CMAKE_EXE_LINKER_FLAGS_INIT,
CMAKE_SHARED_LINKER_FLAGS_INIT, and 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 vari-
able is defined.
MACOSX_DEPLOYMENT_TARGET
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Specify the minimum version of macOS on which the target binaries are
to be deployed.
The MACOSX_DEPLOYMENT_TARGET environment variable sets the default
value for the CMAKE_OSX_DEPLOYMENT_TARGET variable.
<PackageName>_ROOT
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Calls to find_package(<PackageName>) will search in prefixes specified
by the <PackageName>_ROOT environment variable, where.
CMAKE-ENV-VARIABLES(7) CMake CMAKE-ENV-VARIABLES(7)
NAME
cmake-env-variables - CMake Environment Variables Reference
This page lists environment variables that have special meaning to
CMake.
For general information on environment variables, see the Environment
Variables section in the cmake-language manual.
ENVIRONMENT VARIABLES THAT CHANGE BEHAVIOR
CMAKE_PREFIX_PATH
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The CMAKE_PREFIX_PATH environment variable may be set to a list of di-
rectories specifying installation prefixes to be searched by the
find_package(), find_program(), find_library(), find_file(), and
find_path() commands. Each command will add appropriate subdirectories
(like bin, lib, or include) as specified in its own documentation.
This variable may hold a single prefix or a list of prefixes separated
by : on UNIX or ; on Windows (the same as the PATH environment variable
convention on those platforms).
See also the CMAKE_PREFIX_PATH CMake variable.
ENVIRONMENT VARIABLES THAT CONTROL THE BUILD
CMAKE_BUILD_PARALLEL_LEVEL
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Specifies the maximum number of concurrent processes to use when build-
ing using the cmake --build command line Build Tool Mode.
If this variable is defined empty the native build tools default number
is used.
CMAKE_CONFIG_TYPE
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The default build configuration for Build Tool Mode and ctest build
handler when there is no explicit configuration given.
CMAKE_EXPORT_COMPILE_COMMANDS
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The default value for CMAKE_EXPORT_COMPILE_COMMANDS when there is no
explicit configuration given on the first run while creating a new
build tree. On later runs in an existing build tree the value persists
in the cache as CMAKE_EXPORT_COMPILE_COMMANDS.
CMAKE_GENERATOR
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Specifies the CMake default generator to use when no generator is sup-
plied with -G. If the provided value doesnt name a generator known by
CMake, the internal default is used. Either way the resulting genera-
tor selection is stored in the CMAKE_GENERATOR variable.
Some generators may be additionally configured using the environment
variables:
o CMAKE_GENERATOR_PLATFORM
o CMAKE_GENERATOR_TOOLSET
o CMAKE_GENERATOR_INSTANCE
CMAKE_GENERATOR_INSTANCE
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_INSTANCE if no Cache entry is
present. This value is only applied if CMAKE_GENERATOR is set.
CMAKE_GENERATOR_PLATFORM
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_PLATFORM if no Cache entry is present
and no value is specified by cmake(1) -A option. This value is only
applied if CMAKE_GENERATOR is set.
CMAKE_GENERATOR_TOOLSET
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_TOOLSET if no Cache entry is present
and no value is specified by cmake(1) -T option. This value is only
applied if CMAKE_GENERATOR is set.
CMAKE_<LANG>_COMPILER_LAUNCHER
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default compiler launcher to use for the specified language. Will only
be used by CMake to initialize the variable on the first configuration.
Afterwards, it is available through the cache setting of the variable
of the same name. For any configuration run (including the first), the
environment variable will be ignored if the CMAKE_<LANG>_COM-
PILER_LAUNCHER variable is defined.
CMAKE_MSVCIDE_RUN_PATH
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Extra PATH locations for custom commands when using Visual Studio 9
2008 (or above) generators.
The CMAKE_MSVCIDE_RUN_PATH environment variable sets the default value
for the CMAKE_MSVCIDE_RUN_PATH variable if not already explicitly set.
CMAKE_NO_VERBOSE
Disables verbose output from CMake when VERBOSE environment variable is
set.
Only your build tool of choice will still print verbose output when you
start to actually build your project.
CMAKE_OSX_ARCHITECTURES
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Target specific architectures for macOS.
The CMAKE_OSX_ARCHITECTURES environment variable sets the default value
for the CMAKE_OSX_ARCHITECTURES variable. See OSX_ARCHITECTURES for
more information.
DESTDIR
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
On UNIX one can use the DESTDIR mechanism in order to relocate the
whole installation. DESTDIR means DESTination DIRectory. It is com-
monly used by makefile users in order to install software at non-de-
fault location. It is usually invoked like this:
make DESTDIR=/home/john install
which will install the concerned software using the installation pre-
fix, e.g. /usr/local prepended with the DESTDIR value which finally
gives /home/john/usr/local.
WARNING: DESTDIR may not be used on Windows because installation prefix
usually contains a drive letter like in C:/Program Files which cannot
be prepended with some other prefix.
LDFLAGS
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
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 CMAKE_EXE_LINKER_FLAGS_INIT,
CMAKE_SHARED_LINKER_FLAGS_INIT, and 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 vari-
able is defined.
MACOSX_DEPLOYMENT_TARGET
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Specify the minimum version of macOS on which the target binaries are
to be deployed.
The MACOSX_DEPLOYMENT_TARGET environment variable sets the default
value for the CMAKE_OSX_DEPLOYMENT_TARGET variable.
<PackageName>_ROOT
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Calls to find_package(<PackageName>) will search in prefixes specified
by the <PackageName>_ROOT environment variable, where.
CMAKE-ENV-VARIABLES(7) CMake CMAKE-ENV-VARIABLES(7)
NAME
cmake-env-variables - CMake Environment Variables Reference
This page lists environment variables that have special meaning to
CMake.
For general information on environment variables, see the Environment
Variables section in the cmake-language manual.
ENVIRONMENT VARIABLES THAT CHANGE BEHAVIOR
CMAKE_PREFIX_PATH
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The CMAKE_PREFIX_PATH environment variable may be set to a list of di-
rectories specifying installation prefixes to be searched by the
find_package(), find_program(), find_library(), find_file(), and
find_path() commands. Each command will add appropriate subdirectories
(like bin, lib, or include) as specified in its own documentation.
This variable may hold a single prefix or a list of prefixes separated
by : on UNIX or ; on Windows (the same as the PATH environment variable
convention on those platforms).
See also the CMAKE_PREFIX_PATH CMake variable.
ENVIRONMENT VARIABLES THAT CONTROL THE BUILD
CMAKE_BUILD_PARALLEL_LEVEL
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Specifies the maximum number of concurrent processes to use when build-
ing using the cmake --build command line Build Tool Mode.
If this variable is defined empty the native build tools default number
is used.
CMAKE_CONFIG_TYPE
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The default build configuration for Build Tool Mode and ctest build
handler when there is no explicit configuration given.
CMAKE_EXPORT_COMPILE_COMMANDS
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
The default value for CMAKE_EXPORT_COMPILE_COMMANDS when there is no
explicit configuration given on the first run while creating a new
build tree. On later runs in an existing build tree the value persists
in the cache as CMAKE_EXPORT_COMPILE_COMMANDS.
CMAKE_GENERATOR
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Specifies the CMake default generator to use when no generator is sup-
plied with -G. If the provided value doesnt name a generator known by
CMake, the internal default is used. Either way the resulting genera-
tor selection is stored in the CMAKE_GENERATOR variable.
Some generators may be additionally configured using the environment
variables:
o CMAKE_GENERATOR_PLATFORM
o CMAKE_GENERATOR_TOOLSET
o CMAKE_GENERATOR_INSTANCE
CMAKE_GENERATOR_INSTANCE
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_INSTANCE if no Cache entry is
present. This value is only applied if CMAKE_GENERATOR is set.
CMAKE_GENERATOR_PLATFORM
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_PLATFORM if no Cache entry is present
and no value is specified by cmake(1) -A option. This value is only
applied if CMAKE_GENERATOR is set.
CMAKE_GENERATOR_TOOLSET
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default value for CMAKE_GENERATOR_TOOLSET if no Cache entry is present
and no value is specified by cmake(1) -T option. This value is only
applied if CMAKE_GENERATOR is set.
CMAKE_<LANG>_COMPILER_LAUNCHER
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Default compiler launcher to use for the specified language. Will only
be used by CMake to initialize the variable on the first configuration.
Afterwards, it is available through the cache setting of the variable
of the same name. For any configuration run (including the first), the
environment variable will be ignored if the CMAKE_<LANG>_COM-
PILER_LAUNCHER variable is defined.
CMAKE_MSVCIDE_RUN_PATH
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Extra PATH locations for custom commands when using Visual Studio 9
2008 (or above) generators.
The CMAKE_MSVCIDE_RUN_PATH environment variable sets the default value
for the CMAKE_MSVCIDE_RUN_PATH variable if not already explicitly set.
CMAKE_NO_VERBOSE
Disables verbose output from CMake when VERBOSE environment variable is
set.
Only your build tool of choice will still print verbose output when you
start to actually build your project.
CMAKE_OSX_ARCHITECTURES
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
Target specific architectures for macOS.
The CMAKE_OSX_ARCHITECTURES environment variable sets the default value
for the CMAKE_OSX_ARCHITECTURES variable. See OSX_ARCHITECTURES for
more information.
DESTDIR
This is a CMake Environment Variable. Its initial value is taken from
the calling process environment.
On UNIX one can use the DESTDIR mechanism in order to relocate the
whole installation. DESTDIR means DESTination DIRectory. It is com-
monly used by makefile users in order to install software at non-de-
fault location. It is usually invoked like this:
make DESTDIR=/home/john install
which will install the concerned software usi
3.18.4 September 13, 2021 CMAKE-ENV-VARIABLES(7)
Czas wygenerowania: 0.00025 sek.
Created with the man page lookup class by Andrew Collington.
Based on a C man page viewer by Vadim Pavlov
Unicode soft-hyphen fix (as used by RedHat) by Dan Edwards
Some optimisations by Eli Argon
Caching idea and code contribution by James Richardson
Copyright © 2003-2025 Linux.pl
Hosted by Hosting Linux.pl