Commit Graph

1248 Commits

Author SHA1 Message Date
Brad King
a569077b88 Merge topic 'patch-CMAKE_COMPILER_IS_GNU-docs'
7db3f983b3 CMAKE_COMPILER_IS_*: Add RST deprecation directives and update docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10550
2025-04-01 13:03:45 -04:00
Brad King
029415fc68 Merge topic 'unity-relative-paths'
f706d8064b Help: Clarify wording of UNITY_BUILD_RELOCATABLE path alternatives
20412690fb Help: Add 4.0 release note for UNITY_BUILD_RELOCATABLE
89cea1c642 Help: Document CMAKE_UNITY_BUILD_RELOCATABLE variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10570
2025-04-01 12:54:36 -04:00
Brad King
89cea1c642 Help: Document CMAKE_UNITY_BUILD_RELOCATABLE variable
In commit 84996a65aa (Unity: Add option to use relative paths for unity
files, 2024-10-15, v4.0.0-rc1~637^2) we added support for this variable
to initialize the `UNITY_BUILD_RELOCATABLE` target property, but forgot
to document it.

Issue: #26352
2025-03-31 19:31:00 -04:00
Brad King
908814cda0 Merge topic 'iar-help-compiler-arch-id'
775e532afb IAR: Update documentation for CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10548
2025-03-31 09:45:15 -04:00
Craig Scott
eab202ac9d Merge topic 'doc-4.0-release-cleanup'
5dff5e2f7f Help: Fix typo in 4.0 release notes for CPack archive generator
713968c280 Help: Improve wording of docs related to MSVC runtime checks
316aaa6cdd Help: Fix inaccurate wording for CMAKE_XCODE_SCHEME_... variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10545
2025-03-30 06:00:08 -04:00
Peter Kokot
7db3f983b3 CMAKE_COMPILER_IS_*: Add RST deprecation directives and update docs
The `CMAKE_COMPILER_IS_*` variables have been documented as deprecated
since CMake 3.24, without emitting warnings.  This commit updates their
documentation to help users safely migrate to `CMAKE_<LANG>_COMPILER_ID`
variables. Also a RST deprecation directive is added to clarify their
status.
2025-03-28 21:14:19 +01:00
Felipe Torrezan
775e532afb IAR: Update documentation for CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID 2025-03-28 10:47:37 +01:00
Craig Scott
316aaa6cdd Help: Fix inaccurate wording for CMAKE_XCODE_SCHEME_... variables 2025-03-28 14:23:46 +11:00
Brad King
f403e570eb Merge topic 'compiler-architecture-id'
7f0f382c55 Provide CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID on more compilers
019f0f8b32 ARCHITECTURE_ID: Save persistently even if empty
8e46672b29 Fortran: Detect pointer size on sparc architectures
eddf66eaef CMakeDetermineASMCompiler: De-duplicate list of compiler info variables
c0224f5aa1 CMakeDetermineCompilerABI: Make ABI info string more robust
67ab580804 Windows/Clang: Fix indentation in platform information module
1c9f8eeb4f Help: Document CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10516
2025-03-27 09:21:48 -04:00
Brad King
ffad375ab1 Merge topic 'fix-CMAKE_PKG_CONFIG_PC_PATH-doc-typo-error'
a57eec57e5 Help: Fix typo in CMAKE_PKG_CONFIG_PC_PATH docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10530
2025-03-27 09:07:41 -04:00
權少
a57eec57e5 Help: Fix typo in CMAKE_PKG_CONFIG_PC_PATH docs 2025-03-26 09:11:35 -04:00
Brad King
f37d0f33b2 Merge topic 'patch-CTEST_CVS_CHECKOUT'
77d23eaa8f CTEST_CVS_CHECKOUT: Add deprecated directive to docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10512
2025-03-25 10:36:29 -04:00
Brad King
7f0f382c55 Provide CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID on more compilers
Provide it whenever we can detect a target architecture from the
compiler during compiler inspection.  In order to avoid changing
existing IDs, do this only for compilers where we don't already
detect a target architecture during compiler identification.

Fixes: #17702
2025-03-25 09:30:36 -04:00
Brad King
1c9f8eeb4f Help: Document CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
Issue: #17702
2025-03-24 12:22:22 -04:00
Peter Kokot
77d23eaa8f CTEST_CVS_CHECKOUT: Add deprecated directive to docs
This variable got introduced in CMake 2.4 and was documented as
deprecated in CMake 3.1.
2025-03-24 01:06:29 +01:00
Peter Kokot
39d6672e82 Help: Document QCC and SCO CMAKE_<LANG>_COMPILER_ID
- QNX C/C++ compiler is identified in `CMAKE_<LANG>_COMPILER_ID` as
  value "QCC". The qcc/q++ are frontend compiler commands that invoke
  the GNU compiler (gcc/g++) as a backend compiler, but it's treated as
  a separate compiler with its own ID for better determination.

- The C/C++ compiler on UnixWare/OpenServer is identified in
  `CMAKE_<LANG>_COMPILER_ID` as value "SCO", (compiler that defines the
  `__SCO_VERSION__` preprocessor macro).
2025-03-23 15:32:26 +01:00
Brad King
a28d24ce13 Merge topic 'pkgc-variable-docs'
8817f3b131 PkgC: Document cmake variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10493
2025-03-20 08:54:24 -04:00
Vito Gamberini
8817f3b131 PkgC: Document cmake variables 2025-03-19 07:58:31 -04:00
Roger Leigh
99c8abed55 kFreeBSD: Remove support for obsolete platform
kFreeBSD is no longer maintained or supported and was never an
officially-supported release architecture for Debian.

Closes: #26742
2025-03-05 11:57:49 -05:00
Brad King
d1812031a8 Merge topic 'Help-CMAKE_LANG_LINK_MODE-clarify_usage'
b0d0a8d54f Help: CMAKE_LANG_LINK_MODE: clarify usage.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10411
2025-03-03 08:57:49 -05:00
Marc Chevrier
b0d0a8d54f Help: CMAKE_LANG_LINK_MODE: clarify usage. 2025-03-02 13:57:30 +01:00
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