Commit Graph

68558 Commits

Author SHA1 Message Date
Brad King 4ecf57dcd9 Merge topic 'homebrew-prefix'
da07c8ad2a macOS: Detect homebrew prefix from brew tool

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10138
2025-01-15 09:38:17 -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
Brad King 523dd37961 Merge branch 'release-3.31' 2025-01-15 09:34:54 -05:00
Brad King 2245af3ab0 Merge topic 'clang-cuda-link-flags'
ae7f54e6a7 Clang/CUDA: Fix language-wide flags when linking .so with compiler driver

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: DavidRV00 <david@davidv.xyz>
Merge-request: !10173
2025-01-15 09:34:54 -05:00
Brad King 61c07b1a2b Merge topic 'clang-cuda-link-flags' into release-3.31
ae7f54e6a7 Clang/CUDA: Fix language-wide flags when linking .so with compiler driver

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: DavidRV00 <david@davidv.xyz>
Merge-request: !10173
2025-01-15 09:34:51 -05:00
Brad King e442c5ee16 Merge topic 'FindPatch-script-mode'
04c5492cb0 FindPatch: Define imported target only for PROJECT CMAKE_ROLE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10164
2025-01-15 09:32:51 -05:00
Kitware Robot d973339ded CMake Nightly Date Stamp 2025-01-15 00:06:41 -05:00
Brad King ae7f54e6a7 Clang/CUDA: Fix language-wide flags when linking .so with compiler driver
In commit cfa888a6e2 (Clang/CUDA: Add language-wide flags when linking
with compiler driver, 2024-10-07, v3.31.0-rc1~12^2) we added the wrong
placeholder to `CMAKE_CUDA_CREATE_SHARED_LIBRARY` to represent the
language-wide flags.  The `<FLAGS>` placeholder is for executables.
The `<LANGUAGE_COMPILE_FLAGS>` placeholder is for shared libraries.
The distinction is for historical reasons.

Fixes: #26563
2025-01-14 13:20:43 -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
Alexander Grund da07c8ad2a macOS: Detect homebrew prefix from brew tool
Although not recommended by homebrew, users can install it in a
non-standard prefix.  Ask `brew --prefix` before using defaults.
2025-01-14 10:47:25 -05: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 c36ba41bee Merge topic 'patch-find-patch-2'
e39f0bcf34 FindPatch: Mark Patch_EXECUTABLE as advanced variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10165
2025-01-14 09:51:51 -05:00
Brad King 9dec3a50ab Merge branch 'release-3.31' 2025-01-14 09:49:03 -05:00
Brad King 050cfe27ac Merge topic 'fix-installscripts-gen'
183d25f1b8 Merge branch 'backport-fix-installscripts-gen' into fix-installscripts-gen
ca5e6dadb5 install: Generate InstallScripts.json in consistent location
98a34a06e6 install: Generate InstallScripts.json in consistent location

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10168
2025-01-14 09:49:02 -05:00
Brad King a29e1884a3 Merge topic 'fix-installscripts-gen' into release-3.31
ca5e6dadb5 install: Generate InstallScripts.json in consistent location

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10168
2025-01-14 09:48:57 -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 c7c322be9a Merge topic 'find-cps-deps'
42de87cbae find_package: Find CPS dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10109
2025-01-14 09:41:14 -05:00
Kitware Robot 25782aa61f CMake Nightly Date Stamp 2025-01-14 00:05:51 -05:00
Brad King 183d25f1b8 Merge branch 'backport-fix-installscripts-gen' into fix-installscripts-gen 2025-01-13 12:08:29 -05:00
Martin Duffy ca5e6dadb5 install: Generate InstallScripts.json in consistent location
Since commit 159ba027b9 (Install: Add parallel installation option,
2024-06-19, v3.31.0-rc1~333^2) the file was generated relative to the
current working directory.  This is not always the top of the build
tree, so specify the path explicitly.
2025-01-13 12:04:42 -05:00
Martin Duffy 98a34a06e6 install: Generate InstallScripts.json in consistent location
Since commit 159ba027b9 (Install: Add parallel installation option,
2024-06-19, v3.31.0-rc1~333^2) the file was generated relative to the
current working directory.  This is not always the top of the build
tree, so specify the path explicitly.
2025-01-13 12:02:02 -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 66ba4fcae7 Merge topic 'ctest-cost-test-name-fix'
040da7d832 ctest: Allow arbitrary characters in test names of CTestCostData.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10161
2025-01-13 11:45:17 -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 3c57d9bbc3 Merge topic 'patch-feature-summary'
0dab706e94 FeatureSummary: Enhance documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10142
2025-01-13 11:28:57 -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
Brad King 80bac4de30 Merge topic 'cmake-self-symlinks'
6d9ab7964d cmake: Restore finding installed resources in their real path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10160
2025-01-13 11:19:56 -05:00
Matthew Woehlke 42de87cbae find_package: Find CPS dependencies
Implement finding dependencies of CPS packages. This is done by setting
up additional `cmFindPackageCommand` instances which are used to look
for a parent package's dependencies.
2025-01-13 08:43:14 -05:00
Kitware Robot 0410dfbe76 CMake Nightly Date Stamp 2025-01-13 00:06:20 -05:00
Alex Turbov d620d77d26 FindDoxygen: Rename _Doxygen_dne_header -> _Doxygen_do_not_edit_header 2025-01-12 18:49:35 +04:00
Alex Turbov e7ff3cccea PushToAndroidDevice.cmake: Rename cmake_parse_arguments prefix
The upcoming `typos` spell checker don't like the old prefix,
so to avoid further false-positive, let's rename it to a more generic
and a bit more readable `_arg`.
2025-01-12 18:49:34 +04: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
Alex Turbov 78e45c2db6 Style: Replace TABs with spaces for indentation in some files
Mark files that must use TABs to indent in the `.gitattributes`.
Use space instead of TABs in sources and some data/test files.
2025-01-12 18:49:25 +04:00
Peter Kokot 8ad171553b Help: Add _See Also_ to CMAKE_SCRIPT_MODE and CMAKE_ROLE 2025-01-12 07:24:57 +01:00
Kitware Robot 4f68bfdc15 CMake Nightly Date Stamp 2025-01-12 00:07:58 -05:00
Peter Kokot e39f0bcf34 FindPatch: Mark Patch_EXECUTABLE as advanced variable 2025-01-11 19:31:04 +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
Kitware Robot 0cc144ecfd CMake Nightly Date Stamp 2025-01-11 00:06:29 -05:00
John Drouhard 040da7d832 ctest: Allow arbitrary characters in test names of CTestCostData.txt
This changes the way lines in CTestCostData.txt are parsed to allow for
spaces in the test name.

It does so by looking for space characters from the end; and once two
have been found, assumes everything from the beginning up to that
second-to-last-space is the test name.

Additionally, parsing the file should be much more efficient since there
is no string or vector heap allocation per line. The std::string used by
the parse function to convert the int and float should be within most
standard libraries' small string optimization.

Fixes: #26594
2025-01-10 13:05:29 -06:00
Peter Kokot 0dab706e94 FeatureSummary: Enhance documentation
This fixes typos, syncs docs code style a bit and refactors functions
descriptions.

- Initial example improved and synced with the current
  `feature_summary()` output
- The global properties are listed with indentation
- Added reference links where it makes sense to better understand the
  terminology
- CMake versions added for all properties (they got introduced in CMake
  3.8)
- All "macro" words renamed to "function"
- "Legacy Macros" renamed to "Deprecated Functions"
2025-01-10 18:39:15 +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 v3.31.4 2025-01-10 09:59:02 -05:00
Brad King bc21c8ad97 Merge branch 'release-3.31' 2025-01-10 09:28:16 -05:00
Brad King 92f6b92155 Merge topic 'duplicate-source-behavior'
3e15419bd4 target_sources: Restore toleration of duplicate CXX_MODULES sources
5cfb8ae790 Tests/CXXModules: add a test with duplicate sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10155
2025-01-10 09:28:16 -05:00
Brad King 92b260387d Merge topic 'duplicate-source-behavior' into release-3.31
3e15419bd4 target_sources: Restore toleration of duplicate CXX_MODULES sources
5cfb8ae790 Tests/CXXModules: add a test with duplicate sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10155
2025-01-10 09:28:14 -05:00
Brad King 9a17116942 Merge branch 'release-3.31' 2025-01-10 09:26:59 -05:00