Commit Graph

83 Commits

Author SHA1 Message Date
Brad King
33856b1d62 Add CMAKE_POLICY_VERSION_MINIMUM environment variable
Extend commit 1a35351125 (Add CMAKE_POLICY_VERSION_MINIMUM to help
configure outdated projects, 2025-02-13, v4.0.0-rc1~12^2) with an
environment variable to initialize the cache entry.  That will make it
easier to use when `cmake` is invoked under layers of scripting.

Closes: #26715
2025-02-20 16:55:53 -05:00
Zack Galbreath
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files 2025-02-15 06:25:12 -05:00
Alex Turbov
c833629508
Help: Fix typos found by the rst-directive-colons hook
The corresponding `pre-commit` configuration is coming in the
separate MR.

Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2025-01-27 01:00:46 +04:00
Brad King
d94e3eac10 Help: Clarify CLICOLOR and CLICOLOR_FORCE environment variables
Document variable precedence.

Link to third-party documentation of the convention these follow.
For now, link to an older view of the documentation since our
implementation has not been updated for `NO_COLOR`.

Issue: #26458
2024-11-19 11:35:16 -05:00
Brad King
1224fbce3f Help: Document CLICOLOR and CLICOLOR_FORCE environment variables
Issue: #26451
2024-11-18 13:00:22 -05:00
Brad King
2daeb0b504 Merge topic 'build-databases'
e77655555c cmExperimental: gate build database support behind a flag
23cbeb5035 ci: enable `build_database` CXXModules tests
6863c1d823 Tests/CXXModules: add tests for module commands
123107c1a4 Tests/CXXModules: add support for running targets under a given config
438038b5e1 Tests/CXXModules: support building specific targets of example trees
84bc710d84 cmGlobalGenerator: generate build database files for targets
670f753f24 cmDyndepCollation: write build database metadata
dcf9a66ffe cxxmodules: plumb control data for exporting build databases
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9708
2024-09-05 09:20:23 -04:00
Ben Boeckel
e77655555c cmExperimental: gate build database support behind a flag
Given that the feature currently only supports C++ sources and is not
formally accepted by ISO yet, gate it behind a flag.
2024-09-03 10:05:40 -04:00
Brad King
241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Ben Boeckel
dcf9a66ffe cxxmodules: plumb control data for exporting build databases
This includes the target property, its initializing variable, its
initializing environment variable, and updating related docs to mention
the new bits.
2024-08-27 12:37:36 -04:00
Martin Duffy
1df94443fe fileapi: Add support for user-wide queries
Fixes: #19168
2024-08-22 10:24:23 -04:00
Martin Duffy
159ba027b9 Install: Add parallel installation option
Fixes: #26000
2024-07-15 11:49:29 -04:00
Brad King
03c31b0395 Drop Visual Studio 9 2008 generator
This generator has been deprecated since CMake 3.27.  Remove it.
2024-05-08 10:37:34 -04:00
Alexander Borsuk
31e6017bb6 Help: Document ObjC/ObjC++ flag variables
Signed-off-by: Alexander Borsuk <me@alex.bio>
2024-04-18 17:48:59 +02:00
Brad King
0d250dd021 ExternalProject: Honor CMAKE_TLS_VERIFY environment variable
Issue: #23608
2024-03-30 09:22:05 -04:00
Brad King
46faaf9667 file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERIFY environment variable
Issue: #23608
2024-03-30 09:22:04 -04:00
Brad King
89e99cca63 Merge topic 'ctest-j-default'
5de1e21659 ctest: Allow passing -j without value to choose a contextual default
bbcbcff7d9 cmCTestMultiProcessHandler: Modernize member initialization
7457b474a1 Tests: Remove unnecessary parallel suppression from CTestCoverageCollectGCOV
ae69801d96 Tests: Convert CTestTestSkipReturnCode to RunCMake.ctest_test case
30dda49416 Tests: Convert CTestTestSerialOrder to RunCMake.ctest_test case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9315
2024-03-11 10:18:50 -04:00
Brad King
5de1e21659 ctest: Allow passing -j without value to choose a contextual default
Under job server integration, added by commit 80fe56c481 (ctest: Add
support for running under a make job server on POSIX systems,
2023-11-15, v3.29.0-rc1~324^2), use a very high default so that
parallelism is effectively limited only by available job server tokens.

Otherwise, choose a default limit based on the number of processors.

Also allow passing `0` to specify unbounded parallelism.

Fixes: #25739
2024-03-10 11:41:39 -04:00
Brad King
2ef3bd9186 ExternalProject: Add TLS version options for https connections
Add a `TLS_VERSION` option and honor `CMAKE_TLS_VERSION` variables.
Also map the version to Git options as we already do for `TLS_VERIFY`.

Issue: #25701
2024-02-28 19:11:29 -05:00
Brad King
434fe8a34b file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION environment variable
Issue: #25701
2024-02-28 08:40:27 -05:00
Silvio Traversaro
06af18b9db cmake: Allow CMAKE_INSTALL_PREFIX to be set by environment variable
Fixes: #25023
2024-01-30 11:44:45 -05:00
scivision
434bd9c0ef Help: Document {CTEST,CMAKE_BUILD}_PARALLEL_LEVEL equivalent command-line
Clarify that the `--parallel` option isn't needed when these env.
variables are set to a finite integer.
2024-01-18 17:37:17 -05:00
Ralf Habacker
1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
Add a `CMAKE_TEST_LAUNCHER` variable and corresponding `TEST_LAUNCHER`
target property.

Issue: #23672
2023-12-13 10:20:43 -05:00
Brad King
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
Also add `HIPHOSTCXX` environment variable.
2023-09-25 16:11:18 -04:00
Brad King
8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs 2023-09-25 16:06:30 -04:00
Matt McCormick
7005dea005 CrossCompiling: Load CMAKE_CROSSCOMPILING_EMULATOR from environment
Read `CMAKE_CROSSCOMPILING_EMULATOR` from an environment variable of the
same name if not specified with `-D` or an initial cache value.

Along with existing environment variable settings such as
`CMAKE_TOOLCHAIN_FILE`, cross compilation configuration can be more
completely set via environment variables.

Suggested-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-06-13 13:58:44 -04:00
Brad King
023de565d3 Optionally exclude implicit link directories via environment
A misconfigured compiler may pass extraneous implicit link directories
to its linker.  If they are in `CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES`,
CMake may generate extra `-L` flags on mixed-language link lines that
break linking.  Add an environment variable that users can set to work
around such misconfiguration of their compilers.
2023-05-25 13:42:58 -04:00
Alex Neundorf
e40d4eb644 Help: add documentation for some CMAKE_XXX_PATH env.vars
This patch adds basic documentation for the CMAKE_INCLUDE_PATH,
CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH, CMAKE_APPBUNDLE_PATH and
CMAKE_FRAMEWORK_PATH environment variables and links to the
respective cmake variables and vice versa.
2023-05-01 15:12:17 +02:00
Brad King
89b69bf1ad Add CMAKE_MAXIMUM_RECURSION_DEPTH environment variable
Extend the recursion limit controls added by commit a6982cff0d
(cmMakefile: Impose maximum recursion limit, 2018-12-14,
v3.14.0-rc1~82^2) with an environment variable that is used if the
CMake variable of the same name is not set.
2023-03-13 11:45:58 -04:00
Brad King
df9c4b1872 find_package: Use <PACKAGENAME>_ROOT variables as search prefixes
Extend commit eb35d8884b (find_package: Use PackageName_ROOT variables
as search prefixes, 2018-03-15, v3.12.0-rc1~349^2) to also check
upper-case `<PACKAGENAME>_ROOT` variables.  Add policy `CMP0144` to
enable the behavior in a compatible way.

Fixes: #24403
2023-02-23 09:15:14 -05:00
Brad King
20e727a408 Help: Clarify that <PackageName>_ROOT variable names are case-preserved
The name comes from the case-preserved first argument to
`find_package`.
2023-02-08 14:06:38 -05:00
friendlyanon
0661de58d8 ctest(1): Add CTEST_NO_TESTS_ACTION env var
This environment variable provides a default value for the
--no-tests=<action> command line argument.
2023-01-13 13:33:39 +01:00
Ilia K
3166547cf6 ASM_MARMASM: Add support for Microsoft ARM assembler language
https://learn.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-reference

Fixes: #23999
2022-11-09 10:22:46 -05:00
Brad King
e0075799ed Help: Clarify how language-specific flag environment values are used
Previous the wording could be interpreted to mean that the environment
variables like `CXXFLAGS` are used exclusively to initialize the
corresponding cache entries like `CMAKE_CXX_FLAGS`.  State clearly
that the value will be used in combination with builtin defaults.

Issue: #23956
2022-10-18 14:10:41 -04:00
Brad King
b768a5e23b Help: Disambiguate cmake(1) program modes in Sphinx option references
Define the entry point to each mode as an option for the `cmake`
program, but reference the options for that mode as part of stand-in
`cmake-<mode>` programs.
2022-10-05 15:27:40 -04:00
Maxim Cournoyer
10bf34a2d9 cmCurl: Honor OpenSSL certificate environment variables
Honor the OpenSSL environment variables used to specify the location of
the TLS certificates, as specified in the `curl(1)` man page.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-09-16 09:40:28 -04:00
Alex Turbov
04843d743e Help: Replace a bunch of more `--option to :option:` role 2022-08-04 19:34:45 +04:00
Alex Turbov
b57f27b087 Help: Replace mentions of `-T and -A` options with role 2022-08-04 19:34:45 +04:00
Alex Turbov
d25b232dee Help: Replace mentions of `-G option with :option:-G` role 2022-08-04 19:34:45 +04:00
Brad King
253941634c Help: Update Sphinx versionadded directives for 3.24 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.23.0 --overwrite
2022-06-08 09:07:21 -04:00
Chris Wright
87142bbd5f ADSP: Add dedicated platform module 2022-04-04 17:05:09 +01:00
Semyon Kolton
78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable 2022-03-08 16:38:13 -05:00
Brad King
a9b8c9d33e Help: Clarify roles of DESTDIR and CMAKE_INSTALL_PREFIX 2022-02-04 15:33:11 -05:00
Raul Tambre
ad6cd1074b Help: Correct CUDAHOSTCXX and CUDAARCHS as having higher precedence
For CUDAHOSTCXX the behaviour seems to have been like this since the
introduction of it in commit 9cf5b98d ("CUDA: Prefer environment variables
CUDACXX and CUDAHOSTCXX.", 2016-11-08) and is likely unintentional judging by
the wording of the commit.

The documentation mistake seems to be a copy-paste error from when all the
environment variables were documented in commit e6b77c5f ("Help: Document
CMake's environment variables", 2017-09-01).
Describe this explicitly as it is unlike all other similar environment
variables.

For CUDAARCHS we got it wrong from the get-go in commit c4ae9384 ("CUDA:
Initialize CMAKE_CUDA_ARCHITECTURES using $ENV{CUDAARCHS}", 2020-11-24).

Correcting either to follow the more standard precedence behaviour will require
a policy.

Fixes #23081.
2022-01-15 21:51:21 +02:00
Felix Lelchuk
3caeee0c86 Help: Clarify CMAKE_INSTALL_MODE documentation
Fixes: #22869
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2021-11-24 08:30:38 +11:00
Craig Scott
699d4a98e2 Help: Use definition list for allowed values of CMAKE_INSTALL_MODE
Clean up the wording as well for improved consistency
and clarity.
2021-11-24 08:20:04 +11: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