1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-18 08:51:52 +08:00
Commit Graph

820 Commits

Author SHA1 Message Date
Ralf Habacker
b3f2455862 Help: The old add_test() form does not support TEST_LAUNCHER
Extend commit 1ec0372ed4 (add_test: Optionally use a launcher for tests
running in-project targets, 2023-11-11, v3.29.0-rc1~237^2~1).

Fixes: #27083
2025-07-28 08:20:00 +02:00
Ben Boeckel
1d701491a2 pchreuse: always ask the PCH reuse target for PDB information
The property settings set things up once, but nothing ensures that
post-reuse hookup that any property changes propagate. Instead, when
computing PDB information, if PCH reuse is enabled, just always use its
values.

Also drop enforcement at generate time of property value consistency as
it is now ignored when PCH reuse is in effect.

Additionally, if a target is PCH-reused, generate a PDB output directory
for it.

The `PchReuseFromIgnoreOwnProps` test failed previously because the
post-reuse link update of the consuming `PDB` properties are no longer
considered. The `PchReuseFromUseUpdatedProps` failed because the
post-reuse link did not update the copy of the properties added to
consuming reuse target properties.
2025-07-22 12:42:57 -04:00
Matthew Woehlke
fba540daf6 project: Add SPDX_LICENSE argument
Add an argument to the `project` command to allow specifying a license
for a project as a whole. This is in addition to specifying licenses on
individual targets, and will be used to set the license(s) on exported
packages.

Also, move listing of `COMPAT_VERSION` variables to follow
lexicographical order.
2025-06-20 14:01:25 -04:00
Ben Boeckel
98837b42c3 Help: minor reference and markup fixes 2025-06-12 21:25:24 +02:00
Ben Boeckel
b634998727 Help: add and make references to generators consistent 2025-06-12 21:25:24 +02:00
Maximilian Sander
cdf2a36f48 HIP: Add support for [CMAKE_]HIP_LINKER_LAUNCHER
`CMAKE_<LANG>_LINKER_LAUNCHER` and `<LANG>_LINKER_LAUNCHER` are
already support for C, CXX, CUDA, OBJC, OBJCXX, and Fortran.  Add HIP.

Closes: #26967
2025-05-30 10:05:46 -04:00
Maximilian Sander
77312cc636 CUDA: Add support for [CMAKE_]CUDA_LINKER_LAUNCHER
`CMAKE_<LANG>_LINKER_LAUNCHER` and `<LANG>_LINKER_LAUNCHER` are
already support for C, CXX, OBJC, OBJCXX, and Fortran.  Add CUDA.

Issue: #26967
2025-05-30 10:00:18 -04:00
Brad King
3fdd1a1d13 Autogen: Replace documentation links with their permanent redirects 2025-05-28 11:11:20 -04:00
Maximilian Sander
d176a8c5ce Fortran: Add support for [CMAKE_]Fortran_LINKER_LAUNCHER
`CMAKE_<LANG>_LINKER_LAUNCHER` and `<LANG>_LINKER_LAUNCHER` are
already support for C, CXX, OBJC, and OBJCXX.  Add Fortran.

Closes: #26951
2025-05-27 11:00:54 -04:00
Brad King
fc9e9d1196 Merge topic 'automoc-specific-include-dirs'
39677f4cc6 AUTOMOC: Add option to specify moc include directories explicitly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Osyotr <zhenchik35026@gmail.com>
Merge-request: !10640
2025-05-21 08:46:35 -04:00
Brad King
e711538aca Merge topic 'patch-CheckIPOSupported'
294b30b27e CheckIPOSupported: Extend documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10796
2025-05-20 09:00:16 -04:00
David Worley
39677f4cc6 AUTOMOC: Add option to specify moc include directories explicitly
Add a `AUTOMOC_INCLUDE_DIRECTORIES` target property and a corresponding
`CMAKE_AUTOMOC_INCLUDE_DIRECTORIES` variable to initialize it.
This is useful for targets that do not need moc to search include
directories from all dependencies.

Closes: #26414
2025-05-19 21:07:48 -04:00
Peter Kokot
294b30b27e CheckIPOSupported: Extend documentation
- Added intro code block showing how to include this module.
- Added brief description about IPO and LTO and how it is enabled in
  CMake.
- Used "command" instead of "function".
- Reworded few descriptions.
- Synced indentation for items related to the command section.
- Added "See Also" sections to related target properties and variables.
2025-05-18 23:56:31 +02:00
Daniel Tierney
df3e246bc1 export: Import/export target property for license
Add import/export support and documentation for the SPDX_LICENSE
target property. A target's license can be specified by setting
this property to an SPDX license expression. CMake and CPS-format
export files generated with `export()` or `install()` will
retain the license information. CMake also imports the license
property for imported targets.

Closes: #26706
2025-05-13 17:01:20 -04:00
Brad King
93cbcd7596 Merge topic 'xcode-debugger-workdir'
149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
0f1b9ef32a Help: VS_DEBUGGER_WORKING_DIRECTORY precedence

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10736
2025-05-05 08:52:54 -04:00
Craig Scott
149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
This also means when XCODE_SCHEME_WORKING_DIRECTORY is
set and a Xcode generator is used, that property will be used when
writing the debugger field in the file API replies.

Fixes: #26909
2025-05-03 10:16:15 -04:00
Craig Scott
0f1b9ef32a Help: VS_DEBUGGER_WORKING_DIRECTORY precedence
The DEBUGGER_WORKING_DIRECTORY property is ignored when
VS_DEBUGGER_WORKING_DIRECTORY is set and a Visual Studio
generator is used.
2025-05-03 10:15:36 -04:00
Peter Kokot
72e5ebcbd3 FindXCTest: Update documentation
- Module documentation synced with other similar find modules.
- Added examples section.
- Added note about Swift Testing framework, which supersedes the XCTest.
- Added note about the XCTEST target property and synced docs a bit.
- Used word "commands" instead of "macros" or "functions".
2025-04-28 00:12:14 +02:00
Alex Turbov
9784834b4c Help: Use *.rst extension for included files
So, editor(s) can correctly highlight the RST syntax in the included files.
2025-04-14 03:07:46 +04:00
Felipe Torrezan
c7d2a17253 IAR: Add support for C-STAT static analysis
The IAR platform offers an integrated static analysis tool named
IAR C-STAT.

Closes: #26844
2025-04-09 12:01:02 -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
f706d8064b Help: Clarify wording of UNITY_BUILD_RELOCATABLE path alternatives 2025-03-31 19:35:30 -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
Craig Scott
713968c280 Help: Improve wording of docs related to MSVC runtime checks 2025-03-28 14:23:47 +11:00
Peter Kokot
e60bdd1014 FindQt4: Update documentation
Changes:
- Lowercase style used for Qt4 macros
- Module documentation reformatted similar to other pages
- Module commands listed using the RST `:command:` directive,
  descriptions refactored and arguments described separately
2025-03-21 17:13:18 +01:00
Giacomo Rombaut
15a1769bd8 GenEx: Add support for PDB_NAME and COMPILE_PDB_NAME
Closes: #26729
2025-03-11 10:28:12 -04:00
Giacomo Rombaut
b66dbdb6f1 Help: Document COMPILE_PDB_OUTPUT_DIRECTORY genex support
The change in commit 79ca546ed2 (Add generator expression support to
PDB_OUTPUT_DIRECTORY target property, 2018-05-17, v3.12.0-rc1~65^2)
added genex support for `COMPILE_PDB_OUTPUT_DIRECTORY` too, but it
was not documented.

Fixes: #26745
2025-03-06 08:16:40 -05:00
Brad King
6080449551 Help: Document when PDB_OUTPUT_DIRECTORY gained genex support 2025-03-06 08:14:41 -05:00
Nikita Nemkin
9955a3bb73 Help: Clarify EXCLUDE_FROM_DEFAULT_BUILD behavior
Note that solution build configurations ignore dependencies, unlike
the ALL_BUILD target.

Fixes: #12379
2025-02-19 21:07:51 +05:00
Nikita Nemkin
9c963de998 Help: Remove stray spaces and one colon 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
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
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
AJIOB
49dcd1ce5d Help: Fix MSVC_DEBUG_INFORMATION_FORMAT description of example 2025-01-24 11:48:57 -05:00
Brad King
a2267f337a Merge topic 'doc-auto-export'
7a69f9037e Help: Document more WINDOWS_EXPORT_ALL_SYMBOLS limitations on data symbols

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10219
2025-01-24 10:24:36 -05:00
Brad King
7a69f9037e Help: Document more WINDOWS_EXPORT_ALL_SYMBOLS limitations on data symbols
Issue: #26604
2025-01-22 16:58:52 -05:00
Brad King
ac1a9cb160 CMP0063: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King
759b55991a Merge topic 'renumber-to-4.0'
bd176b430c Renumber post-3.31 development from 3.32 to 4.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10183
2025-01-17 08:56:31 -05:00
Brad King
e95fce2849 Merge topic 'LINK_WARNING_AS_ERROR-extend-capabilities'
b350f95ecf LINK_WARNING_AS_ERROR property: extend capabilities
216c469214 MSVC: Use dash-style flag for LINK_WARNING_AS_ERROR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10133
2025-01-17 08:50:32 -05:00
Marc Chevrier
b350f95ecf LINK_WARNING_AS_ERROR property: extend capabilities
Fixes: #26536
2025-01-16 22:35:00 +01: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
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
Andreas Hartmetz
7e1a0739db Help: POSITION_INDEPENDENT_CODE applies to *all* libraries
It is sometimes useful, e.g. when linking a static library into a
shared library, it needs to be PIC.
2025-01-14 18:12:33 +01: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
bc8621d999 Fix: A lot of typos in code found by typos
Yet another great code spellchecker: https://github.com/crate-ci/typos/

(Will be added later as a `pre-commit` hook)
2025-01-12 18:49:34 +04:00
Alex Turbov
b65930a7a7 Fortran: Add Fortran_BUILDING_INTRINSIC_MODULES for building intrinsics
In commit fe3f846e1b (Makefiles: Add support for building Fortran
intrinsics, 2020-11-19, v3.22.0-rc1~565^2) the property was added with
incorrect spelling `Fortran_BUILDING_INSTRINSIC_MODULES`.  Add a new
property with the correct spelling.  Keep the old one for compatibility.

Issue: #21463
2025-01-09 15:30:00 -05: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