Commit Graph

1227 Commits

Author SHA1 Message Date
Brad King
75da788360 Merge topic 'find-package-required'
857a039d66 find_*: Add variable to default calls to REQUIRED

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10364
2025-02-28 11:15:23 -05:00
Martin Duffy
857a039d66 find_*: Add variable to default calls to REQUIRED
This adds a `CMAKE_FIND_REQUIRED` variable which causes `find_package`,
`find_path`, `find_file`, `find_library` and `find_program` to be
considered `REQUIRED` by default.

It also introduces an `OPTIONAL` keyword to those commands, allowing
them to ignore the value of this variable.

Issue: #26576
2025-02-27 10:51:07 -05:00
Hongxu Xu
0e2b87244c find_package: Fix CMAKE_FIND_PACKAGE_SORT_DIRECTION documented default
Previously the documentation said the default was `DEC`,
but the implementation has always defaulted to `ASC`.

Fixes: #22728
2025-02-24 15:03:34 -05:00
Brad King
f0140a6e72 Merge topic 'policy-version-env'
33856b1d62 Add CMAKE_POLICY_VERSION_MINIMUM environment variable
04721acc6c Tests: Cover CMAKE_POLICY_VERSION_MINIMUM in initial cache script
729470ff6d Tests: Cover CMAKE_POLICY_VERSION_MINIMUM in script mode
6cd10ffed7 Tests: Cover CMAKE_POLICY_VERSION_MINIMUM as cache entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: John Parent <john.parent@kitware.com>
Merge-request: !10376
2025-02-21 09:13:01 -05:00
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
Brad King
808ada63cb Merge topic 'diab-compiler-support'
8ce6689d8b Diab: Add WindRiver Systems's Diab C/C++ toolchain

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10276
2025-02-14 09:35:26 -05:00
Brad King
dce6a7aa61 Merge topic 'policy-version-var'
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
d723198539 Help: De-duplicate policy version documentation
e5d29e9e00 Help: Drop cmake_minimum_required pre-2.4 behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10343
2025-02-14 09:32:36 -05:00
Brad King
47689e9253 Merge topic 'policy-version-var' into release-4.0
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
d723198539 Help: De-duplicate policy version documentation
e5d29e9e00 Help: Drop cmake_minimum_required pre-2.4 behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10343
2025-02-14 09:32:33 -05:00
Brad King
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
Provide packagers and end users with a way to try configuring projects that
have not been updated to set their policy version to a supported level.

Closes: #26698
2025-02-13 14:00:26 -05:00
Sanjiv Gupta
8ce6689d8b Diab: Add WindRiver Systems's Diab C/C++ toolchain
Teach CMake to recognize Diab versions 5.9.x.x and above.

Closes: #26666
2025-02-13 10:15:00 -05:00
Alex Neundorf
8905157694 Help: Link CMAKE_CURRENT_LIST_(DIR|FILE|LINE) to/from FUNCTION-equivalents 2025-02-13 09:46:20 -05:00
Aditya Vidyadhar Kamath
ff03db6657 AIX: Add platform id variables 'AIX' and 'CMAKE_HOST_AIX'
This allows projects to use `if(AIX)` blocks instead of spelling
out `if(CMAKE_SYSTEM_NAME STREQUAL "AIX")`.  We already have similar
variables for many other platforms.
2025-02-07 11:10:43 -05:00
Brad King
5fdd917f8a Help: Update Sphinx versionadded directives for 4.0 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.31.0 --overwrite

Manually renumber `3.32` to `4.0` since the script is meant for
minor version increments.  Also filter out changes to documents
that were added for long-existing variables.
2025-02-05 09:17:06 -05:00
Alex Turbov
8d8fd9de2c
Help: Fix typos in RST found by the rst-backticks hook 2025-02-02 18:56:26 +04:00
Nikita Nemkin
51e4d81f16 Help: Remove accidental blockquotes around lists
Indenting a list relative to the previous paragraph creates
a blockquote. Combined with the natural list indent it results
in an overly large left margin.
2025-01-31 12:23:29 -05:00
Nikita Nemkin
718043b540 Help: Convert some literal blocks into tables and lists
Also, ensure that header-less tables have a top border in cmake.css.
2025-01-31 12:23:29 -05:00
Brad King
3e64c6a56e Merge topic 'msvc-runtime-checks'
2b2344b412 MSVC: Add abstraction for runtime checks
49dcd1ce5d Help: Fix MSVC_DEBUG_INFORMATION_FORMAT description of example
2f8e643d9d CMP0141: Fix documentation copied from CMP0091

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10214
2025-01-30 08:48:01 -05:00
Brad King
a832d31474 Merge topic 'cmake_sarif_output'
abbe41578d cmake: Add SARIF diagnostics output support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10139
2025-01-30 08:43:11 -05:00
Nikita Nemkin
9890cfc4ec Help: More syntax highlighting for literal blocks
Covers almost all blocks containing actual code, except:

* Parsed-literal blocks can't be highlighted, including many command
  summaries and substitution-heavy docs like find_... commands.
  This is a Sphinx limitation.

* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
  DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
  tutorial, bracket arguments/comments in cmake-language.7 and
  cmake-developer.7.

* FindQt4 module, which needs reformatting.
2025-01-29 16:48:53 -05:00
AJIOB
2b2344b412 MSVC: Add abstraction for runtime checks
Replace our hard-coded default for `/RTC1` with a first-class
abstraction to select runtime checks from an enumeration of logical
names.  Add a `MSVC_RUNTIME_CHECKS` target property and corresponding
`CMAKE_MSVC_RUNTIME_CHECKS` variable.

Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose
runtime checks under the old behavior.  Add policy CMP0184 to
provide compatibility.

Fixes: #26614
2025-01-29 13:07:41 -05:00
Daniel Tierney
abbe41578d cmake: Add SARIF diagnostics output support
Closes: #26587
2025-01-29 08:43:19 -05:00
Brad King
d6a7a83700 Merge topic 'fix-typos-found-by-pygrep-hooks'
bc4c71627a Help: Fix typos found by the `rst-backticks` hook
c833629508 Help: Fix typos found by the `rst-directive-colons` hook

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10237
2025-01-28 08:35:19 -05:00
Brad King
084f6055a8 Merge topic 'patch-CMAKE_OBJDUMP'
dc7aabf4d0 Help: Document CMAKE_OBJDUMP variable
4bd3519e89 CPack: Avoid mentioning internal CMake module in documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10224
2025-01-27 10:30:58 -05:00
Alex Turbov
bc4c71627a
Help: Fix typos found by the rst-backticks 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:43:26 +04: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
Marc Chevrier
3d2709c1ae Linker configuration: rely now on CMAKE_<LANG>_LINK_MODE variable.
CMake now provides the CMAKE_<LANG>_LINK_MODE variable which specify how
the link step is done. So, the CMAKE_<LANG>_USING_LINKER_MODE variable
is no longer needed.
2025-01-26 14:45:21 +01:00
AJIOB
49dcd1ce5d Help: Fix MSVC_DEBUG_INFORMATION_FORMAT description of example 2025-01-24 11:48:57 -05:00
Peter Kokot
dc7aabf4d0 Help: Document CMAKE_OBJDUMP variable 2025-01-24 10:43:18 -05:00
Brad King
1d4d4362d9 Merge topic 'remove-old-compatibility'
77f71ad4e2 Remove compatibility with CMake versions older than 3.5
fb1bd1d330 CMP0065: Remove support for OLD behavior
d9dd38cccf CMP0064: Remove support for OLD behavior
d88047c329 Remove compatibility with CMake versions older than 3.3
ac1a9cb160 CMP0063: Remove support for OLD behavior
36fffb673a CMP0062: Remove support for OLD behavior
789a7d73d4 CMP0061: Remove support for OLD behavior
3dc19e24cb CMP0060: Remove support for OLD behavior
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10210
2025-01-23 09:36:59 -05:00
Brad King
fb1bd1d330 CMP0065: Remove support for OLD behavior 2025-01-22 10:40:55 -05:00
Brad King
3dc19e24cb CMP0060: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King
cf6114886a Merge topic 'CMAKE_LANG_DEVICE_LINK_MODE'
53de9d0125 Introduce CMAKE_<LANG>_DEVICE_LINK_MODE variable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10209
2025-01-22 09:24:27 -05:00
Brad King
e7a90d0551 Help: Document CTEST_EXTRA_SUBMIT_FILES variable 2025-01-21 14:55:14 -05:00
Brad King
123e002168 Help: Document CTEST_NOTES_FILES variable 2025-01-21 14:52:14 -05:00
Brad King
cbe7fc4b81 CMP0056: Remove support for OLD behavior 2025-01-21 09:44:05 -05:00
Marc Chevrier
53de9d0125 Introduce CMAKE_<LANG>_DEVICE_LINK_MODE variable.
This is a complement to commit 00932ea864 (Introduce CMAKE_<LANG>_LINK_MODE variable., 2025-01-09)
2025-01-21 15:17:05 +01:00
Brad King
05b2c563bb CMP0047: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King
796cf2d8eb CMP0025: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
Brad King
03a215643d CMP0001: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Brad King
bd176b430c Renumber post-3.31 development from 3.32 to 4.0
Issue: #26613
2025-01-16 09:18:21 -05:00
Brad King
e87c6c6259 Merge topic 'execute-process-error'
3ece058d97 execute_process: Allow setting default COMMAND_ERROR_IS_FATAL value
85035dd954 Help/command/execute_process: Fix definition list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10169
2025-01-16 08:59:00 -05:00
Martin Duffy
3ece058d97 execute_process: Allow setting default COMMAND_ERROR_IS_FATAL value
Issue: #26576
2025-01-15 11:12:34 -05:00
Andreas Hartmetz
a6315790a1 Help: CMAKE_POSITION_INDEPENDENT_CODE is ignored for some targets
SHARED and MODULE library targets have
POSITION_INDEPENDENT_CODE default to TRUE regardless of
CMAKE_POSITION_INDEPENDENT_CODE.
2025-01-14 18:12:47 +01:00
Brad King
0cca7df474 Merge topic 'patch-CMAKE_SCRIPT_MODE_FILE'
8ad171553b Help: Add _See Also_ to CMAKE_SCRIPT_MODE and CMAKE_ROLE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10166
2025-01-14 09:46:39 -05:00
Brad King
72e27a4856 Merge topic 'fix-typos-found-by-pre-commit-hooks'
d620d77d26 FindDoxygen: Rename `_Doxygen_dne_header` -> `_Doxygen_do_not_edit_header`
e7ff3cccea PushToAndroidDevice.cmake: Rename `cmake_parse_arguments` prefix
bc8621d999 Fix: A lot of typos in code found by `typos`
b33beb7af5 Help: Fix some typos found by `sphinx-lint`
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
74e0173f66 Tests(NuGet): Fix the test to ignore empty and space-only lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10151
2025-01-14 09:44:34 -05:00
Brad King
74c462b4f8 Merge topic 'xcode-scheme-test-config'
7d28005244 Xcode: Support for test action 'Build Configuration' scheme property
1f4e1ccbc8 Help: Move launch config scheme property to the correct section
8aaae0f643 vim: Remove duplicated keywords from cmake.vim

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10154
2025-01-13 11:37:31 -05:00
Alex Turbov
b33beb7af5
Help: Fix some typos found by sphinx-lint
Particularly,

- Avoid TABs in RST docs.
- Avoid words ending w/ hyphen at the right side of pharagraphs.
2025-01-12 18:49:34 +04:00
Peter Kokot
8ad171553b
Help: Add _See Also_ to CMAKE_SCRIPT_MODE and CMAKE_ROLE 2025-01-12 07:24:57 +01:00
Marc Chevrier
00932ea864 Introduce CMAKE_<LANG>_LINK_MODE variable.
This variable define how the link step is done. Possible values are:
* DRIVER: the compiler is used as driver for the link step
* LINKER: the linker is used directly for the link step.
2025-01-10 13:24:16 +01:00
Cristiano Carvalheiro
7d28005244 Xcode: Support for test action 'Build Configuration' scheme property
Also allow scoped property checking on Xcode scheme tests to
 be able to distinguish between launch and test actions build config.
2025-01-09 16:36:33 +00:00