Commit Graph

8295 Commits

Author SHA1 Message Date
Brad King
fbb69f867c Merge topic 'FindCURL-version-var'
d039da1c24 FindCURL: Add CURL_VERSION variable to match upstream cmake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10250
2025-01-29 11:32:39 -05:00
Daniel Tierney
abbe41578d cmake: Add SARIF diagnostics output support
Closes: #26587
2025-01-29 08:43:19 -05:00
Peter Kokot
4e6a13f211 Use lower case style for commands
Where possible this syncs the CS for command names:

- check_c_source_compiles()
- check_cxx_compiler_flag()
- check_cxx_source_compiles()
- check_cxx_symbol_exists()
- check_include_file_cxx()
- check_include_file()
- check_include_files()
- check_library_exists()
- check_source_compiles()
- check_struct_has_member()
- check_symbol_exists()
- check_type_size()
- cmake_dependent_option()
- cmake_parse_arguments()
- feature_summary()
- file()
- find_package_handle_standard_args()
- if(), endif...
- install(FILES)
- list()
- message()
- pkg_check_modules()
- select_library_configurations()
- set_package_info()
- test_big_endian()
2025-01-28 13:51:46 -05:00
Marc Chevrier
a3ae58c9c5 C++ features: add cm::is_scoped_enum from C++23 2025-01-28 17:52:36 +01:00
Brad King
d039da1c24 FindCURL: Add CURL_VERSION variable to match upstream cmake package
`find_package(CURL CONFIG)` provides `CURL_VERSION` from the upstream
cmake package version file.

Upstream curl commit `699ac9430c` (cmake: publish/check supported
protocols/features via `CURLConfig.cmake`, 2024-12-29) extends the
upstream cmake package to provide our old `CURL_VERSION_STRING`.
Provide both names from CMake's own module to aid transition.

Fixes: #26634
2025-01-28 09:52:22 -05:00
Peter Kokot
477737b7bf
load_cache: Add note about export()
The export() command can be a better option when outside project can be
adjusted in such way.
2025-01-28 15:22:29 +01:00
Brad King
aeff709a27 Merge topic 'patch-load-cache-script-mode'
18ae68a97c load_cache: Mention script mode support (-P)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10241
2025-01-28 09:19:58 -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
0e0fc63bd8 Merge topic 'codespell'
d2752135cb codespell: Fix typos found by version 2.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10236
2025-01-28 08:25:51 -05:00
Peter Kokot
9f2efc3270
Remove optional arguments from else() and end*() commands
This adds a brief explanation of the optional condition in the `else()`
and removes all legacy usages of `else()` and `end*()` commands.
2025-01-28 03:01:23 +01:00
Peter Kokot
18ae68a97c
load_cache: Mention script mode support (-P)
When using the relevant load_cache(READ_WITH_PREFIX) signature, it also
works in script mode (cmake -P ...), unlike the 2nd obsolete signature.
2025-01-28 00:59:50 +01:00
Brad King
59113292b2 Merge topic 'install-parallel-doc-fix'
f1a80380ae Help: Improve language in INSTALL_PARALLEL doc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10238
2025-01-27 11:21:49 -05:00
Brad King
3ffac3063d Merge topic 'doc-policy-deprecation-schedule'
3e0720a2ae Help: Add cmake_minimum_required(VERSION) example to cmake-policies(7)
085de39879 Help: Document policy transition schedule in cmake-policies(7)
60e302a539 Help: Drop policy scope from cmake-policies(7)
3b926b32e3 Help: Drop CMAKE_MINIMUM_REQUIRED_VERSION from cmake-policies(7)
ec9e5feb93 Help: Organize cmake-policies(7) by supported and unsupported policies
6be0fe22be Help: Mention CMAKE_POLICY_DEFAULT_CMP<NNNN> in cmake_minimum_required

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10222
2025-01-27 11:18:46 -05:00
Alex Turbov
d2752135cb codespell: Fix typos found by version 2.4 2025-01-27 10:55:58 -05:00
Brad King
3e0720a2ae Help: Add cmake_minimum_required(VERSION) example to cmake-policies(7) 2025-01-27 10:35:04 -05:00
Brad King
085de39879 Help: Document policy transition schedule in cmake-policies(7)
Rewrite the introduction of the manual to focus on policies' role in
evolution of CMake and how projects should be updated to account for
them over time.

Issue: #26613
2025-01-27 10:35:04 -05:00
Brad King
60e302a539 Help: Drop policy scope from cmake-policies(7)
The policy stack is covered by the `cmake_policy`, `include`, and
`find_package` command documentation.  Avoid distracting readers with
such details in the main policy introduction.
2025-01-27 10:35:04 -05:00
Brad King
3b926b32e3 Help: Drop CMAKE_MINIMUM_REQUIRED_VERSION from cmake-policies(7)
The variable has little role with respect to policies, particularly
since introduction of the `...<policy_max>` syntax.  Furthermore,
any role it may have is primarily in CMake's own modules.
2025-01-27 10:35:04 -05:00
Brad King
ec9e5feb93 Help: Organize cmake-policies(7) by supported and unsupported policies 2025-01-27 10:34:56 -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
Brad King
304f086b71 Merge topic 'doc-cmake_host_system_information-OS_NAME'
ff11a95962 Help: Clarify cmake_host_system_information OS_NAME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nicole Mazzuca <nicole.mazzuca@remarkable.no>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10232
2025-01-27 10:26:33 -05:00
Brad King
16f9016605 Merge topic 'help-json'
7be01178a0 Help: JSON argument should be quoted

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10231
2025-01-27 10:24:45 -05:00
Martin Duffy
f1a80380ae Help: Improve language in INSTALL_PARALLEL doc
Remove unneeded comma, clarify and link reference to Ninja generators, and substitute ``ON`` for enabled.
2025-01-27 09:41:59 -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
scivision
7be01178a0 Help: JSON argument should be quoted
The error that results from a semicolon anywhere in a JSON string
is not obvious.

Issue: #26628
2025-01-24 12:00:56 -05:00
AJIOB
49dcd1ce5d Help: Fix MSVC_DEBUG_INFORMATION_FORMAT description of example 2025-01-24 11:48:57 -05:00
AJIOB
2f8e643d9d CMP0141: Fix documentation copied from CMP0091 2025-01-24 11:48:56 -05:00
Brad King
ff11a95962 Help: Clarify cmake_host_system_information OS_NAME
Fixes: #26631
2025-01-24 10:58:35 -05:00
Peter Kokot
dc7aabf4d0 Help: Document CMAKE_OBJDUMP variable 2025-01-24 10:43:18 -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
5f6114f8b8 Merge topic 'patch-load-cache'
6fc8d20250 load_cache: Improve explanation of command signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10216
2025-01-24 10:20:13 -05:00
Brad King
ac601c8a51 Merge topic 'clang-format-18'
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
6ef947ea97 Empty commit at end of history preceding clang-format "east const" transition
08f1cae4e8 clang-format: Enforce "east const" qualifier placement
b2ba64add9 Revise C++ coding style using clang-format-18
c03bab9610 Empty commit at end of history preceding clang-format-18 style transition
e641442149 clang-format.bash: update to clang-format-18

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10225
2025-01-24 09:53:52 -05:00
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
Brad King
e641442149 clang-format.bash: update to clang-format-18
The `.clang-format` configuration needs no changes to make the
version 18 format close to what version 15 produced before.

Issue: #26123
2025-01-23 11:42:52 -05:00
Brad King
cf44774fd0 Merge branch 'release-3.31' 2025-01-23 11:27:53 -05:00
Brad King
9fe70fd764 CMake 3.31.5 2025-01-23 10:53:36 -05:00
Brad King
e2a0790be5 Merge branch 'release-3.30' 2025-01-23 10:40:41 -05:00
Brad King
ba5aaa73ba Merge branch 'release-3.30' into release-3.31 2025-01-23 10:40:25 -05:00
Brad King
d437178a10 CMake 3.30.7 2025-01-23 09:59:38 -05:00
Brad King
6be0fe22be Help: Mention CMAKE_POLICY_DEFAULT_CMP<NNNN> in cmake_minimum_required
We already mention it in equivalent text for `cmake_policy`.
2025-01-23 09:41:08 -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
63924c4afa Merge topic 'ci-typos'
c3777c1536 ci: Extend spellcheck job with 'typos' tool
d11552c2d9 codespell: Exclude paths by patterns following pre-commit check conventions
11d0a631d4 codespell: Split multi-valued configuration across multiple lines
54dfadaf5a ci: Rename "codespell" job to more general name "spellcheck"
17fc94e5e3 ci: Add typos 1.29.4 to Fedora base image
ddf8220572 ci: Use Fedora 41 default flang package now that it is new enough
1e2d19ea4f gitignore: Tell tools honoring .gitignore to ignore .git too
0d0a94bcfb Tests: Fix Fortran syntax for initialized variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10211
2025-01-23 09:34:02 -05:00
Peter Kokot
6fc8d20250
load_cache: Improve explanation of command signatures
This extends the descriptions of command signatures and options.
Additional examples are listed at the bottom for better understanding
and overview of this command.
2025-01-22 23:40:39 +01: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
77f71ad4e2 Remove compatibility with CMake versions older than 3.5
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2).  The behavior itself has been deprecated
since CMake 3.5.

Issue: #26613
2025-01-22 10:40:55 -05:00
Brad King
fb1bd1d330 CMP0065: Remove support for OLD behavior 2025-01-22 10:40:55 -05:00
Brad King
d9dd38cccf CMP0064: Remove support for OLD behavior 2025-01-22 10:40:55 -05:00
Brad King
d88047c329 Remove compatibility with CMake versions older than 3.3
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2).  The behavior itself has been deprecated
since CMake 3.3.

Issue: #26613
2025-01-22 10:40:54 -05:00
Brad King
ac1a9cb160 CMP0063: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King
36fffb673a CMP0062: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King
789a7d73d4 CMP0061: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King
3dc19e24cb CMP0060: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King
1393fbf13f CMP0059: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
Brad King
8f9f01b24d CMP0058: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Brad King
c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -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
Alex Turbov
c3777c1536 ci: Extend spellcheck job with 'typos' tool
Unlike the `codespell`, `typos` is capable of finding typos
in combined identifiers (`CamelCase` or `snake_case`).
2025-01-22 08:51:45 -05:00
Brad King
9204721eda Help: Clarify 'ctest --extra-submit'
Also fix its test to submit a valid file.

Fixes: #26611
2025-01-21 14:55:25 -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
2782d095b0 Remove compatibility with CMake versions older than 3.2
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2).  The behavior itself has been deprecated
since CMake 3.2.

Issue: #26613
2025-01-21 09:44:05 -05:00
Brad King
cbe7fc4b81 CMP0056: Remove support for OLD behavior 2025-01-21 09:44:05 -05:00
Brad King
cfcb36ca34 CMP0055: Remove support for OLD behavior 2025-01-21 09:44:05 -05:00
Brad King
7a39d926e8 Merge topic 'remove-old-compatibility'
381c446ff7 VS: Remove support for appending a platform to the generator name
dc24d88062 Remove compatibility with CMake versions older than 3.1
90d814f024 CMP0054: Remove support for OLD behavior
292aaffb78 Source: Remove unused cmCommandArgument{Lexer,Parser}
1150fae89a CMP0053: Remove support for OLD behavior
f0b1ca4d70 CMP0052: Remove support for OLD behavior
e4fddc8e37 CMP0051: Remove support for OLD behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10205
2025-01-21 09:43:10 -05:00
Brad King
2902d3f827 Merge topic 'patch-file-make-directory'
2e02e5589d file(MAKE_DIRECTORY): Document current source directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10203
2025-01-21 09:32:46 -05:00
Brad King
a91a01747d Merge topic 'patch-installation-components'
5a974b99fe install: Document where the components are used

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10202
2025-01-21 09:31:05 -05:00
Brad King
d15845d27a Merge topic 'doc/configure_log_api'
4699554c62 Help: Document when file-api configureLog was added

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10204
2025-01-21 09:28:40 -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
381c446ff7 VS: Remove support for appending a platform to the generator name
Compatibility with CMake versions prior to 3.1 is no longer supported.

Fixes: #26481
2025-01-21 08:08:22 -05:00
Cristian Le
4699554c62 Help: Document when file-api configureLog was added
Issue: #23200
Signed-off-by: Cristian Le <git@lecris.dev>
2025-01-20 11:21:54 -05:00
Brad King
dc24d88062 Remove compatibility with CMake versions older than 3.1
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2).  The behavior itself has been deprecated
since CMake 3.1.

Issue: #26613
2025-01-20 09:46:55 -05:00
Brad King
90d814f024 CMP0054: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
Brad King
1150fae89a CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
Brad King
f0b1ca4d70 CMP0052: Remove support for OLD behavior 2025-01-20 09:46:54 -05:00
Brad King
e4fddc8e37 CMP0051: Remove support for OLD behavior 2025-01-20 09:46:54 -05:00
Peter Kokot
2e02e5589d
file(MAKE_DIRECTORY): Document current source directory
Relative paths in the directories list argument are treated as relative
to the current source directory.
2025-01-20 14:59:38 +01:00
Peter Kokot
5a974b99fe
install: Document where the components are used 2025-01-20 12:02:23 +01:00
Brad King
8e0a0291ef Remove compatibility with CMake versions older than 3.0
This compatibility has been deprecated since commit 3a4791548d
(Deprecate compatibility with CMake versions older than 3.5, 2023-02-09,
v3.27.0-rc1~508^2).  The behavior itself has been deprecated
since CMake 3.0.

Issue: #26613
2025-01-19 09:41:04 -05:00
Brad King
6973f8304e CMP0050: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King
9f6011e307 CMP0049: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King
292048874f CMP0048: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King
05b2c563bb CMP0047: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King
d9498a474e CMP0046: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King
1e8a744f07 CMP0045: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
Brad King
9094eaa778 CMP0044: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
Brad King
ed99370f63 CMP0043: Remove support for OLD behavior
Note that per-source `COMPILE_DEFINITIONS_<CONFIG>` are not covered by
the policy, and are still supported.
2025-01-19 09:41:02 -05:00
Brad King
1bb0066b0c Help: Clarify deprecation of source-file property COMPILE_DEFINITIONS_<CONFIG>
It is not covered by policy `CMP0043`.  Also fix its link
to the `COMPILE_DEFINITIONS` source file property.
2025-01-19 09:41:02 -05:00
Brad King
9b148ed1ac CMP0042: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
Brad King
7193c2d23d CMP0041: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
Brad King
cddac8736d CMP0040: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
Brad King
0b6412b514 CMP0039: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
Brad King
af28f030d8 CMP0038: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
Brad King
84f737545f CMP0037: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
Brad King
850174c507 CMP0036: Remove support for OLD build_name command 2025-01-19 09:41:01 -05:00
Brad King
5b255fe7da CMP0035: Remove support for OLD variable_requires command 2025-01-19 09:41:01 -05:00
Brad King
84c3943873 CMP0034: Remove support for OLD utility_source command 2025-01-19 09:41:01 -05:00
Brad King
76702e36e3 CMP0033: Remove support for OLD export_library_dependencies command 2025-01-19 09:41:00 -05:00
Brad King
ff6d55f8c5 CMP0032: Remove support for OLD output_required_files command 2025-01-19 09:41:00 -05:00
Brad King
dc0c6734d3 CMP0031: Remove support for OLD load_command command 2025-01-19 09:41:00 -05:00
Brad King
6bdf4efbb3 CMP0030: Remove support for OLD use_mangled_mesa command 2025-01-19 09:41:00 -05:00
Brad King
683a02f5a0 CMP0029: Remove support for OLD subdir_depends command 2025-01-19 09:41:00 -05:00
Brad King
59ba0948a3 Help: Add boilerplate text for removed policies of disallowed commands 2025-01-19 09:40:59 -05:00
Brad King
84b7c9f5dd CMP0028: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
Brad King
5754c9f731 CMP0027: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
Brad King
f8bc8780c1 CMP0026: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
Brad King
796cf2d8eb CMP0025: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
Brad King
65b45de1dd CMP0024: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
Brad King
3c4afba8cc Remove compatibility with CMake versions older than 2.8.12
This compatibility has been deprecated since commit 5845c218d7
(Deprecate compatibility with CMake versions older than 2.8.12,
2020-06-12, v3.19.0-rc1~629^2).  The behavior itself has been
deprecated since CMake 2.8.12.

Issue: #26613
2025-01-18 09:51:45 -05:00
Brad King
0453f70400 CMP0023: Remove support for OLD behavior 2025-01-18 09:51:45 -05:00
Brad King
888259c894 CMP0022: Remove support for OLD behavior 2025-01-18 09:51:45 -05:00
Brad King
e31d1c7600 CMP0021: Remove support for OLD behavior 2025-01-18 09:51:44 -05:00
Brad King
094b42b643 CMP0020: Remove support for OLD behavior 2025-01-18 09:51:44 -05:00
Brad King
092d6de4be CMP0019: Remove support for OLD behavior 2025-01-18 09:51:44 -05:00
Brad King
41a7a0119f CMP0018: Remove support for OLD behavior 2025-01-18 09:51:44 -05:00
Brad King
d74210a8bd CMP0017: Remove support for OLD behavior 2025-01-18 09:51:44 -05:00
Brad King
ae13e27225 CMP0016: Remove support for OLD behavior 2025-01-18 09:51:43 -05:00
Brad King
a43470b9ba CMP0015: Remove support for OLD behavior 2025-01-18 09:51:43 -05:00
Brad King
8ef1b4001b Merge topic 'remove-old-compatibility'
785523a136 Remove compatibility with CMake versions older than 2.8.0
35282387ea CMP0014: Remove support for OLD behavior
fad9c55b8b CMP0013: Remove support for OLD behavior
98a59ba8ad CMP0012: Remove support for OLD behavior
3c0dbb66f5 CMP0011: Remove support for OLD behavior
cf832e75bc CMP0010: Remove support for OLD behavior
77f8c374f3 CMP0009: Remove support for OLD behavior
43ef139567 CMP0008: Remove support for OLD behavior
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10188
2025-01-18 09:50:27 -05:00
Brad King
c2838829f2 Merge topic 'instrumentation-target-labels'
9d34069ca8 instrumentation: Add targetLabels field to link snippets
32444714e5 instrumentation: Update tests so that snippet verification runs
11bcf2efb8 instrumentation: Correct example v1 Data snippet in manual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Roscoe A. Bartlett <rabartl@sandia.gov>
Merge-request: !10185
2025-01-18 09:46:29 -05:00
Martin Duffy
9d34069ca8 instrumentation: Add targetLabels field to link snippets
Adds a new data field `targetLabels` to link snippets which contains a list of
text labels from the LABELS target property.
2025-01-17 11:07:30 -05:00
Martin Duffy
11bcf2efb8 instrumentation: Correct example v1 Data snippet in manual 2025-01-17 10:29:02 -05:00
Brad King
785523a136 Remove compatibility with CMake versions older than 2.8.0
This compatibility has been deprecated since commit 5845c218d7
(Deprecate compatibility with CMake versions older than 2.8.12,
2020-06-12, v3.19.0-rc1~629^2).  The behavior itself has been
deprecated since CMake 2.8.0.

Issue: #26613
2025-01-17 09:36:10 -05:00
Brad King
35282387ea CMP0014: Remove support for OLD behavior 2025-01-17 09:28:37 -05:00
Brad King
fad9c55b8b CMP0013: Remove support for OLD behavior 2025-01-17 09:28:37 -05:00
Brad King
98a59ba8ad CMP0012: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
3c0dbb66f5 CMP0011: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
cf832e75bc CMP0010: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
77f8c374f3 CMP0009: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
43ef139567 CMP0008: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
d77a7e8d1c CMP0007: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
Brad King
5fd46699fc CMP0006: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Brad King
03934f16fa CMP0005: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Brad King
2a0a7401ce CMP0004: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Brad King
9dd9321a18 CMP0003: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Brad King
136528aa1b CMP0002: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Brad King
03a215643d CMP0001: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Brad King
e62b6cb748 CMP0000: Remove support for OLD behavior 2025-01-17 09:28:34 -05:00
Brad King
6a1a08e634 Help: Add boilerplate text to use for removed policies 2025-01-17 09:28:34 -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
Brad King
1d5c1b0023 Merge topic 'policy-cleanup'
b010a1fb1d Help: Update try_compile list of automatic policies
5e9b40b6a5 Help: Update cmake-buildsystem(7) TARGET_POLICY example to a newer policy
9ffbc0e628 Tests/RunCMake/cmake_minimum_required: Generalize deprecated version case name
0eca249ac7 Tests/RunCMake: Update more cmake_minimum_required versions to 3.10
a8cf033a74 Tests/RunCMake/return: Use newer cmake_minimum_required VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10178
2025-01-16 09:01:48 -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
Brad King
8018f2a6c4 Merge topic 'instrumentation'
097d4fd1b5 instrumentation: Collect and record project build system metrics
8a3c195188 Tests/RunCMake: Add RunCMake_CHECK_ONLY Option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9791
2025-01-16 08:55:25 -05:00
Brad King
7ea82512ca Merge topic 'patch-GenerateExportHeader'
319dd29ef0 GenerateExportHeader: Use lowercase command names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10176
2025-01-16 08:52:33 -05:00
Brad King
b010a1fb1d Help: Update try_compile list of automatic policies 2025-01-15 11:21:21 -05:00
Brad King
5e9b40b6a5 Help: Update cmake-buildsystem(7) TARGET_POLICY example to a newer policy 2025-01-15 11:21:21 -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
Brad King
9f21775ae6 Merge topic 'fix_pic_documentation'
a6315790a1 Help: CMAKE_POSITION_INDEPENDENT_CODE is ignored for some targets
7e1a0739db Help: POSITION_INDEPENDENT_CODE applies to *all* libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10172
2025-01-15 09:37:13 -05:00
Martin Duffy
097d4fd1b5 instrumentation: Collect and record project build system metrics
Add a feature for collecting build instrumentation for CMake projects.

Issue: #26099
2025-01-15 09:16:50 -05:00
Peter Kokot
319dd29ef0
GenerateExportHeader: Use lowercase command names
This syncs the command names of the GenerateExportHeader to use
lowercase style and adds few minor adjustmenst for the RST docs.
2025-01-15 09:57:05 +01: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
Peter Kokot
04c5492cb0 FindPatch: Define imported target only for PROJECT CMAKE_ROLE
This enables finding the patch command when using CMake in script modes.
2025-01-14 10:17:09 -05: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
85035dd954 Help/command/execute_process: Fix definition list formatting 2025-01-13 13:34:15 -05:00
Brad King
8913b83d7f Merge topic 'FindPython-ARTIFACTS_PREFIX'
9b0510fa57 FindPython: add support for multiple searches in same directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10157
2025-01-13 11:46:50 -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
Brad King
6a800f666f Merge topic 'CMAKE_LANG_LINK_MODE-variable-creation'
00932ea864 Introduce CMAKE_<LANG>_LINK_MODE variable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10162
2025-01-13 11:23:32 -05:00
Brad King
eb616ed6fd Merge topic 'fix-Fortran_BUILDING_INTRINSIC_MODULES'
b65930a7a7 Fortran: Add Fortran_BUILDING_INTRINSIC_MODULES for building intrinsics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10158
2025-01-13 11:22:05 -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
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
9b0510fa57 FindPython: add support for multiple searches in same directory
In some situations, like cross-compilation, it can be required to search for
the host python interpreter as well as the cross-compilation development
artifacts.
By managing different prefixes for the artifacts, multiple and independent
searches can be achieved.
2025-01-11 15:47:06 +01:00
Brad King
e6d5a518b1 Merge branch 'release-3.31' 2025-01-10 10:58:32 -05:00
Brad King
569b821a13 CMake 3.31.4 2025-01-10 09:59:02 -05:00
Brad King
675518ea81 Merge topic 'revert-genex-tco-subgraph'
a6b84a438f GenEx: Revert "Limit TARGET_PROPERTY transitive closure optimization"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10156
2025-01-10 09:21:04 -05:00
Brad King
1ebfd7ac81 Merge topic 'gcc-import-std'
2a0ca6a26d ci: add jobs to test GCC 15-to-be with `import std`
469175c2e6 Experimental: recycle the `import std` UUID
a980dab9b1 gcc: support `import std`
2791b7564b Tests/RunCMake: handle C++26 support where needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10023
2025-01-10 09:04:38 -05: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
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
Brad King
a6b84a438f GenEx: Revert "Limit TARGET_PROPERTY transitive closure optimization"
Revert commit 4a11772618 (GenEx: Limit TARGET_PROPERTY transitive
closure optimization to subgraphs, 2024-05-31, v3.31.0-rc1~114^2).
The change caused substantial performance regressions in some
existing use cases.  Revert it pending further investigation.

Issue: #25728
Fixes: #26457
2025-01-09 11:56:20 -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
Brad King
5733f2bfcb Merge topic 'patch-file-make-directory'
d7b33ed8e2 file(MAKE_DIRECTORY): Update synopsis signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10145
2025-01-09 10:46:55 -05:00
Brad King
ac54f5d50d Merge topic 'patch-found-var'
1a8e43d57d FindPackageHandleStandardArgs: Clarify the FOUND_VAR option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10134
2025-01-09 10:44:01 -05:00
Brad King
519c252bc8 Merge topic 'tutorial-step1-files-to-edit'
e61ba188b6 Tutorial: Add missing entry in Step 1 list of files to edit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nirav Nirmal <nirmalnirav@outlook.com>
Merge-request: !10135
2025-01-09 10:36:43 -05:00
Cristiano Carvalheiro
1f4e1ccbc8 Help: Move launch config scheme property to the correct section 2025-01-09 14:43:07 +00:00
Ben Boeckel
469175c2e6 Experimental: recycle the import std UUID
Now that GCC is supported, update the feature UUID.
2025-01-08 16:32:14 -05:00
Nirav Nirmal
e61ba188b6 Tutorial: Add missing entry in Step 1 list of files to edit
Exercise 3 requires editing `TutorialConfig.h.in`.
2025-01-08 09:43:06 -05:00
Brad King
d949e7980c Merge topic 'FindBISON-OPTIONS-keyword'
211cec0f20 FindBISON: Add new keyword OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10129
2025-01-08 09:29:38 -05:00
Peter Kokot
d7b33ed8e2
file(MAKE_DIRECTORY): Update synopsis signature
This syncs the signature as it provides another optional option.
2025-01-07 02:15:33 +01:00
Peter Kokot
211cec0f20
FindBISON: Add new keyword OPTIONS
This adds a new keyword OPTIONS which is a semicolon-separated list of
command-line options added to bison command line. This enables adding
options more intuitively. It mainly adds options as quoted arguments
which among other things enables adding paths containing spaces and
similar.

Fixes:
- https://gitlab.kitware.com/cmake/cmake/-/issues/23301
2025-01-06 06:41:57 +01:00
Peter Kokot
d63ffb4116
FindFLEX: Add new keyword OPTIONS
This adds a new keyword OPTIONS which is a semicolon-separated list of
command-line options added to flex command line. This enables adding
options more intuitively. It mainly adds options as quoted arguments
which among other things enables adding paths containing spaces and
similar.

Fixes:
- https://gitlab.kitware.com/cmake/cmake/-/issues/23301
2025-01-06 06:41:41 +01:00
Peter Kokot
1a8e43d57d
FindPackageHandleStandardArgs: Clarify the FOUND_VAR option
The `find_package_handle_standard_args(FOUND_VAR)` is deprecated as of
CMake 3.3 and both the `<PackageName>_FOUND` and the upper-cased
`<PACKAGE_NAME>_FOUND` are set with or without using this option.
Additionally, find modules and docs are also synced with this to make it
clearer.
2024-12-31 02:07:16 +01:00
Peter Kokot
40d68b5087
Help: Add links to FeatureSummary module 2024-12-25 17:32:04 +01:00
Brad King
29385c20e6 Merge topic 'Help-WHOLE_ARCHIVE-clarification'
7baf4a9aeb Help: LINK_LIBRARY:WHOLE_ARCHIVE clarification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10115
2024-12-19 13:32:59 -05:00
Brad King
c8c1c9beb8 Merge branch 'release-3.31' 2024-12-19 10:50:21 -05:00
Marc Chevrier
7baf4a9aeb Help: LINK_LIBRARY:WHOLE_ARCHIVE clarification
Fixes: #26540
2024-12-19 16:41:50 +01:00
Brad King
41abd532b6 CMake 3.31.3 2024-12-19 10:18:19 -05:00
Brad King
4e119c1d7c Merge topic 'try_run_cache'
9be6e42499 Help: Note try_compile/try_run caching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10108
2024-12-19 08:32:59 -05:00
scivision
9be6e42499 Help: Note try_compile/try_run caching 2024-12-18 10:04:47 -05:00
Brad King
5c7bb0bfd9 Merge topic 'rename-cmakelists'
fcbc883fa3 cmake: Allow configuration of default script names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10059
2024-12-18 08:49:58 -05:00
Martin Duffy
fcbc883fa3 cmake: Allow configuration of default script names
Adds the ``--project-file`` command-line option to modify the default script
name loaded by CMake and ``add_subdirectory`` to values other than
``CMakeLists.txt``.

Fixes: #21570
2024-12-17 12:47:02 -05:00
Brad King
e483d7fb57 Merge topic 'ctest-invalid-arg'
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10106
2024-12-17 10:54:55 -05:00
Brad King
f27ba9768b Merge topic 'ctest-invalid-arg' into release-3.31
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10106
2024-12-17 10:54:53 -05:00
Brad King
2264356ebf Merge topic 'doc-buildsystem-binary-targets'
be0b837e2b Help: Fix cmake-buildsystem(7) internal link

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10105
2024-12-17 10:44:37 -05:00
Brad King
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest
This was left out of commit 304396d13c (ctest: Show error on invalid
ctest arguments, 2024-04-03, v3.30.0-rc1~286^2).

Fixes: #26539
2024-12-17 10:32:05 -05:00
Brad King
6f3ec4a341 Merge topic 'GenEx-PATH-NATIVE_PATH'
427be46424 GenEx $<PATH>: Add NATIVE_PATH sub-command.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10087
2024-12-17 10:13:16 -05:00
Brad King
135e6feba9 Merge topic 'find-cps'
d00201afd6 Tests: Add tests for CPS find_package
65429611b9 find_package: Fix handling of relative paths in CPS
5236984a08 Help: Describe CPS support in find_package
34828650d6 find_package: Add experimental gate for CPS support
25cc83428e find_package: Actually import .cps files
91c31ada23 find_package: Actually find .cps files
b89e43b2bc find_package: Start implementing CPS search
3e9f96079d Add additional string case functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10018
2024-12-17 10:12:24 -05:00
Brad King
be0b837e2b Help: Fix cmake-buildsystem(7) internal link
Fix a broken link from commit 987f3fa4e0 (Help: Add cmake-buildsystem(7)
subsections for each binary target type, 2024-12-12).
2024-12-17 10:08:33 -05:00
Brad King
ef1300749c Merge topic 'ci-linkcheck'
25b25a7724 Help: Update link to UTF-8 RFC 3629

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10103
2024-12-17 10:07:47 -05:00
Brad King
25b25a7724 Help: Update link to UTF-8 RFC 3629
The old link now returns 404.
2024-12-16 09:20:23 -05:00
Brad King
546be3530a Merge topic 'xcode-scheme-lldb-init-file'
419cfe30d0 Xcode: Support for 'LLDB Init File' scheme property
65ad1bbd4c vim: Remove duplicated keywords from cmake.vim
a96d6a98d3 Tests/RunCMake/XcodeProject: Improve XcodeSchemaProperty failure messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10093
2024-12-16 09:08:56 -05:00
Brad King
a72262644e Merge topic 'doc-LINK_WHAT_YOU_USE'
e4cd54dab2 Help: Clarify intended purpose of LINK_WHAT_YOU_USE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10101
2024-12-16 09:06:41 -05:00
Brad King
ed8180f2eb Merge topic 'debugger-working-directory'
7bf07baccf Help: Fix indentation of DEBUGGER_WORKING_DIRECTORY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10099
2024-12-16 09:06:02 -05:00
Timothy Finnegan
427be46424 GenEx $<PATH>: Add NATIVE_PATH sub-command.
Implements the generator expression $<PATH:MATIVE_PATH> which convert
path(s) into a native format with platform-specific slashes (``\`` on
Windows hosts and ``/`` elsewhere).

Fixes: #26515
2024-12-14 11:16:47 +01:00
Brad King
e4cd54dab2 Help: Clarify intended purpose of LINK_WHAT_YOU_USE
Avoid implying that it can be used to intentionally link to
shared libraries whose symbols are not needed.

Issue: #26529
2024-12-13 10:53:54 -05:00
Garrett Campbell
7bf07baccf Help: Fix indentation of DEBUGGER_WORKING_DIRECTORY
In commit 9ed178f9d8 (Add generator-agnostic DEBUGGER_WORKING_DIRECTORY
target property, 2024-12-05) the documentation was incorrectly indented.

Issue: #16478
2024-12-13 10:10:13 -05:00
Brad King
987f3fa4e0 Help: Add cmake-buildsystem(7) subsections for each binary target type
Re-organize the "Binary Targets" section of the manual to have a
dedicated subsection for each kind of binary target.  Initialize each
subsection by documenting the object file and link semantics of the
corresponding target type.
2024-12-13 09:53:26 -05:00
Matthew Woehlke
5236984a08 Help: Describe CPS support in find_package
Update find_package documentation to describe (the current state of)
support for Common Package Specification packages. Make some general
improvements to the same while we're at it. Add documentation blurb for
the experimental flag that enables CPS support.
2024-12-13 08:58:24 -05:00
Matthew Woehlke
b89e43b2bc find_package: Start implementing CPS search
Teach find_package to search CPS search paths, and to look for CPS file
names. Modify the set of file names to also include the file type (CPS
or CMake-script). Modify the search function to allow specifying which
file type(s) to consider.

During full path search, each possible path is searched for only one of
the two possible file types. However, subsequent runs, or when
considering a user-specified path (<name>_DIR), CMake will look for both
file types.

Note that this only adds the new path search logic as described above;
CMake does not yet know how to read CPS files, and there is a high
likelihood that Bad Things will happen if it tries. However, this seemed
like a good place to checkpoint.
2024-12-13 08:58:24 -05:00
Cristiano Carvalheiro
419cfe30d0 Xcode: Support for 'LLDB Init File' scheme property
Fixes: #24002
2024-12-13 08:31:11 -05:00
Brad King
85f4fdc000 Merge topic 'debugger-working-directory'
0a9fb88121 fileapi: Report DEBUGGER_WORKING_DIRECTORY in codemodel-v2 target objects
9ed178f9d8 Add generator-agnostic DEBUGGER_WORKING_DIRECTORY target property
200efab4d4 Tests/RunCMake/FileAPI: Improve error on unexpected line numbers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10075
2024-12-11 09:47:03 -05:00
Matthew Woehlke
b4704d3ef8 Help/dev: Improve coding conventions guide
Improve the coding conventions specified in our source code guide:

- Recommend capitalization for locals as well as members.

- Remove exceptions for `const` placement; new code should always prefer
  "east" style.

- Remove separate section; "Code Style" and "Code Conventions" are
  similar enough to not need to make a distinction.
2024-12-10 14:18:08 -05:00
Garrett Campbell
0a9fb88121 fileapi: Report DEBUGGER_WORKING_DIRECTORY in codemodel-v2 target objects
Closes: #16478
2024-12-10 09:04:31 -05:00
Evan Wilde
e1d635e71c
Swift: Expand generator expressions in Swift_MODULE_DIRECTORY
This patch makes the `Swift_MODULE_DIRECTORY` property behave more like
the other output directory properties, allowing generator expressions
and fixing the behavior with multi-config generators.

Issue: #26010
2024-12-09 10:37:05 -08:00
Garrett Campbell
9ed178f9d8 Add generator-agnostic DEBUGGER_WORKING_DIRECTORY target property
Generalize the `VS_DEBUGGER_WORKING_DIRECTORY` property.

Issue: #16478
2024-12-09 10:47:10 -05:00
Brad King
24d97da543 Help/dev: Add some coding conventions to source code guide 2024-12-06 14:07:32 -05:00
Brad King
bed97ced45 Merge branch 'release-3.31' 2024-12-05 09:12:51 -05:00
Brad King
793c5f11f6 CMake 3.31.2 2024-12-05 08:42:47 -05:00
Dan Walsh
a4fc66bb71 Help: Clarify documentation of VS_PROJECT_IMPORT
Also add an example.
2024-12-04 10:45:19 -05:00
SunBlack
ae63ce80a1 Help: Suggest target_compile_features as alternative to CXX_STANDARD_REQUIRED 2024-12-03 12:36:21 +01:00
Brad King
14ed8464c8 Merge topic 'ARCHIVER-prefix'
a4ff2b01e3 IntelLLVM-Windows: add definitions for ARCHIVER: prefix
521a6d409c Archive library: Add support for ARCHIVER: prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10038
2024-11-28 09:22:38 -05:00
Brad King
bf37d5f93a Merge topic 'tutorial-step-7-todo-4'
dccf2bdb75 Tutorial: Restore TODO 4 comment in step 7

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Betsy McPhail <betsy.mcphail@kitware.com>
Merge-request: !10045
2024-11-28 09:19:01 -05:00
Brice Decaestecker
dccf2bdb75 Tutorial: Restore TODO 4 comment in step 7
Restore a comment added by commit f9ef15f3dc (Tutorial: Update step 7
style, 2022-10-07, v3.26.0-rc1~482^2) that was accidentally removed by
commit 8ddf32196c (Tutorial: Refactor MathFunctions code, 2023-02-10,
v3.27.0-rc1~441^2).
2024-11-27 09:28:34 -05:00
Brad King
8a0ebc29da Merge topic 'FeatureSummary-condition-syntax'
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10031
2024-11-27 09:08:29 -05:00
Brad King
0afe2f12f6 Merge topic 'FindGDAL-deprecate'
7e2aee4458 FindGDAL: Document as deprecated in favor of upstream CMake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10040
2024-11-27 09:06:19 -05:00
Brad King
75c8b0202e Merge topic 'find_package_version_range_limitation'
041537e5ce Help: Clarify find_package version range limitation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10041
2024-11-27 09:03:39 -05:00
Marc Chevrier
521a6d409c Archive library: Add support for ARCHIVER: prefix
Add the support of the ARCHIVER: prefix to offer a portable way to pass
options to the archiver when the compiler is used as driver.
2024-11-26 19:26:07 +01:00
Peter Kokot
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax
Closes: #26468
2024-11-26 13:19:25 -05:00
SunBlack
7e2aee4458 FindGDAL: Document as deprecated in favor of upstream CMake package
Issue: #26471
2024-11-26 13:13:20 -05:00
SunBlack
041537e5ce Help: Clarify find_package version range limitation
Issue: #26470
2024-11-26 09:25:15 -05:00
Nuno Nobre
ae33faa330 Help/prop_dir/EXCLUDE_FROM_ALL: Minor wording fix 2024-11-25 16:35:25 -05:00
Brad King
508817037d Merge topic 'aix-archive-shared-libraries'
2c22aae14b Tests/RunCMake: Enable CMP0182 in test cases on AIX
5c78623143 AIX: Enable shared library archives by default
7a05e8e994 Help: Reword AIX_SHARED_LIBRARY_ARCHIVE to avoid assuming a default
655a245d60 Tests: Explicitly disable AIX_SHARED_LIBRARY_ARCHIVE in some cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10030
2024-11-25 10:07:20 -05:00
Brad King
5c78623143 AIX: Enable shared library archives by default
This is the preferred convention for shared libraries on AIX.
Add policy CMP0182 to provide compatibility.

Closes: #26372
2024-11-23 15:23:25 -05:00
Brad King
7a05e8e994 Help: Reword AIX_SHARED_LIBRARY_ARCHIVE to avoid assuming a default 2024-11-23 15:23:25 -05:00
Brad King
1412bfbf58 Merge topic 'vs-solution-items'
0bb13ba0e6 VS: Add support for Visual Studio solution items
f1bcb7276a VS: Refactor solution folder creation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10003
2024-11-23 15:13:59 -05:00
Brad King
1cd99d288f Merge topic 'aix-archive-shared-libraries-export'
cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10027
2024-11-23 15:12:51 -05:00
Lauri Vasama
0bb13ba0e6 VS: Add support for Visual Studio solution items
Files listed in the `VS_SOLUTION_ITEMS` directory property of a project
directory are added as solution items in the 'Solution Items' solution
directory.

If `source_group` is applied to the files listed in `VS_SOLUTION_ITEMS`,
solution groups matching the names of the source groups are created
outside of the default 'Solution Items' group.  If not items are placed
into the default group, it is not created.

Solution items added to subprojects are not included in the top-level
project.

Closes: #26409
2024-11-22 09:12:19 -05:00
Brad King
a882dde32a Merge topic 'policy-cleanup'
94b2d56017 Help/policy/CMP0015: Remove stray indentation
577e693d3e Help: Use standard policy advice in CMP0000
96a0cded7f Tests: Avoid enabling C unnecessarily in CMP0022 and CMP0023 cases
c941f728ec Tests/CPackComponentsForAll: Update cmake_minimum_required to 3.10
34070c3319 Tests/CMakeCommands/target_link_libraries: Fix keyword consistency
73c334677d Tests: Use latest cmake_minimum_required possible for old policy cases
cde63efaea Tests/ExternalProject: Update sample projects to require CMake 3.31
0d416ad57f Tests/PolicyScope: Use more recent policies
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10022
2024-11-22 09:03:20 -05:00
Brad King
cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports
Teach `export()` and `install(EXPORT)` to record this setting on the
imported targets they generate.  Make this property's non-presence
authoritative on imported targets since they represent what was built
elsewhere.
2024-11-21 19:02:00 -05:00
Brad King
8a2e9f152a Merge branch 'release-3.31' 2024-11-21 11:56:45 -05:00
Brad King
eb281d3454 CMake 3.31.1 2024-11-21 11:15:52 -05:00
Brad King
4b9fad4555 Merge branch 'release-3.30' 2024-11-21 10:06:02 -05:00
Brad King
0576d076b1 Merge branch 'release-3.30' into release-3.31 2024-11-21 09:54:18 -05:00
Brad King
817707b904 CMake 3.30.6 2024-11-21 09:18:01 -05:00
Brad King
2d5938dc5c Merge branch 'release-3.29' 2024-11-21 09:12:20 -05:00