Commit Graph

28 Commits

Author SHA1 Message Date
Semyon Kolton
78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable 2022-03-08 16:38:13 -05:00
Felix Lelchuk
58d10cf6f1 Alternative symlink-creating mode for file(INSTALL ...)
An new environment variable 'CMAKE_INSTALL_MODE' is introduced,
which can be used to ask CMake to create symbolic links
instead of copying files during a file(INSTALL ...).

The operation is at the file level only, directory trees are
still created using actual directories, not links.

Signed-off-by: Felix Lelchuk <felix.lelchuk@gmx.de>
2021-08-02 19:42:26 +02:00
Brad King
ef56eefc9b cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable
When no `CMAKE_CONFIGURATION_TYPES` is explicitly specified while
creating a new build tree, check for an environment variable of the same
name.

Issue: #20983
2021-06-30 10:55:40 -04:00
Brad King
e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable
When no `CMAKE_BUILD_TYPE` is explicitly specified while creating a new
build tree, check for an environment variable of the same name.

Issue: #20983
2021-06-30 10:55:40 -04:00
Robert Maynard
b50bfc8913 HIP: Add language to CMake 2021-06-07 19:25:33 +00:00
Brad King
6c34ed9b87 cmake: Allow CMAKE_TOOLCHAIN_FILE to be set by environment variable
When no `CMAKE_TOOLCHAIN_FILE` is explicitly specified while creating
a new build tree, check for an environment variable of the same name.
2021-06-03 08:32:44 -04:00
Bobby D Reynolds
ae108418ae Launchers: Support setting linker launchers
Fixes: #18316
2021-05-28 12:28:43 -04:00
Brad King
794aa36b1f Merge topic 'apple-silicon-host-arch'
b7f0327dcd Tests: Cover macOS host architecture selection on Apple Silicon hosts
5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5589
2020-12-11 13:05:34 -05:00
Brad King
5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts
Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple
Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we use `sysctl` to detect
that we are running on Apple Silicon in a way that pierces Rosetta.
This always sets `CMAKE_HOST_SYSTEM_PROCESSOR` to be `arm64` on such
hosts.  However, macOS offers strong support for running processes under
an emulated `x86_64` architecture.

Teach CMake to select either `arm64` or `x86_64` as the host
architecture on Apple Silicon based on the architecture of its own
process.  When CMake is built as a universal binary, macOS will select
whichever slice (architecture) is appropriate under the user's shell,
and `CMAKE_HOST_SYSTEM_PROCESSOR` will match.

Also offer a `CMAKE_APPLE_SILICON_PROCESSOR` variable and environment
variable to provide users with explicit control over the host
architecture selection regardless of CMake's own architecture.

Finally, if `CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to
the toolchain to use selected host architecture instead of letting the
toolchain pick.

Fixes: #21554
2020-12-10 12:08:13 -05:00
Raul Tambre
c4ae9384ff CUDA: Initialize CMAKE_CUDA_ARCHITECTURES using $ENV{CUDAARCHS}
NVCC's default architecture may be newer than the one supported by the
machine's GPU.
In such cases it's useful to have an environment variable for initializing
CMAKE_CUDA_ARCHITECTURES to avoid specifying it for every invocation.
2020-11-30 17:57:11 +02:00
Robert Maynard
8976817d6d ISPC: Update help documentation to include ISPC 2020-08-28 11:21:31 -04:00
Brad King
a9559ccba5 Merge topic 'objc-env-vars'
13ea190725 Help: Add 3.17.3 release note for Objective C/C++ compiler selection
16bf978e0c Merge branch 'backport-3.16-objc-env-vars' into objc-env-vars
67b9f55d46 Objective C/C++: Honor CC and CXX env vars to select compiler
ab9be6662f Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4746
2020-05-15 09:15:46 -04:00
Brad King
16bf978e0c Merge branch 'backport-3.16-objc-env-vars' into objc-env-vars 2020-05-14 07:27:24 -04:00
Brad King
ab9be6662f Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers 2020-05-14 07:10:06 -04:00
Matthew Woehlke
671fe28313 ccmake: Improve coloring, allow customization
Change the default color for strings from BLUE (which is nearly
illegible on any terminals using the standard color palette which has
been around since at least CGA, almost 40 years ago) to CYAN. Add
ability to customize the colors via an environment variable (inspired by
LS_COLORS and using similar syntax).

Fixes: #20596
2020-04-24 11:21:13 -04:00
Jean-Michaël Celerier
03b6f3a2e8 Help: Document the CMAKE_PREFIX_PATH environment variable 2020-04-14 10:04:58 -04:00
Ben Boeckel
6f48c59257 launcher: support setting a compiler launcher through the environment
This makes it much easier to use a launcher for all CMake projects in an
environment rather than having to remember to pass the setting to every
CMake build.
2019-12-05 14:25:36 -05:00
Daan De Meyer
8065a686dd Initialize CMAKE_EXPORT_COMPILE_COMMANDS from envvar of the same name
Fixes: #18386
2019-10-18 14:37:33 -04:00
Brad King
8ed6efbbd3 Merge topic 'default-generator-env'
d0f0ba0f7a Tests: Add environment generator tests
a48ce8f4bf Help: Add documentation for default generator environment variables
083cf7e8a2 cmake: Allow default generator to be set by environment variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3218
2019-05-22 10:32:43 -04:00
Eicke Herbertz
a48ce8f4bf Help: Add documentation for default generator environment variables
Documentation for environment variables that control the default
generator selection:

* CMAKE_GENERATOR
* CMAKE_GENERATOR_INSTANCE
* CMAKE_GENERATOR_PLATFORM
* CMAKE_GENERATOR_TOOLSET
2019-05-22 07:40:49 -04:00
Saleem Abdulrasool
d745551fb6 Help: add some initial documentation for Swift support 2019-05-16 14:41:05 -04:00
Florian Maushart
439fe2e253 cmake: Add options for verbose output to --build mode
While we already support `VERBOSE` environment variable and
`CMAKE_VERBOSE_MAKEFILE` cached variable, add `-v` and `--verbose`
command line options to be able to activate verbose output directly from
CMake's build tool mode command line.

Also make `msbuild` honor the verbosity setting. `xcodebuild` still
doesn't honor the verbosity setting as it will need a policy added
and reworking of cmGlobalGenerator and cmsys to support
multiple command invocation.
2019-01-28 09:44:50 -05:00
Joachim Wuttke (h)
85498fccd8 Help: Provide backreferences.
Short intro to pages cmake-variables.7 and cmake-env-variables.7,
with backlinks to cmake-language.7.
2018-11-08 20:27:49 +01:00
Craig Scott
2154ea38f9 Help: Add missing docs for the ctest --progress option
These docs were missing from the changes that introduced the feature in
!2240.
2018-10-07 17:03:36 +11:00
Brad King
492ade276b Help: Add explicit <PackageName>_ROOT variable documentation
Add documentation for both the CMake variable and environment variable
of this name pattern.  Update references to these names to link to their
documents.  Clarify the pattern used to construct their names.
2018-07-20 09:43:08 -04:00
Florian Maushart
1ab3881ec9 cmake: Add options for parallel builds to --build mode
While we already support `cmake --build . -- -j`, the options after `--`
are specific to the native build tool.  Add new options `--parallel
[<N>]` and `-j [<N>]` to abstract this and map to the proper option
for the native build tool.
2018-05-25 09:42:20 -04:00
Kyle Edwards
fcf64866da Help: move DESTDIR into a separate page 2018-04-20 08:39:02 -04:00
Robert Maynard
e6b77c5f1a Help: Document CMake's environment variables 2017-09-26 08:44:45 -04:00