Commit Graph

12240 Commits

Author SHA1 Message Date
Brad King
1f59bfaef4 Merge topic 'file-MAKE_DIRECTORY-result-var'
41d91387f6 Merge branch 'backport-3.31-file-MAKE_DIRECTORY-result-var'
3dd701c068 Merge branch 'backport-3.31-file-MAKE_DIRECTORY-result-var' (early part)
397ec37528 file(MAKE_DIRECTORY): Do not make directories for command keywords
a039a1655d file(MAKE_DIRECTORY): Clarify formatting of unexpected arguments error
90d9c79348 file(MAKE_DIRECTORY): Do not make directories for command keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10467
2025-03-14 11:45:44 -04:00
Brad King
41d91387f6 Merge branch 'backport-3.31-file-MAKE_DIRECTORY-result-var' 2025-03-13 11:58:47 -04:00
Brad King
a039a1655d file(MAKE_DIRECTORY): Clarify formatting of unexpected arguments error 2025-03-13 11:57:27 -04:00
Brad King
5d1ec25c60 Merge topic 'test-cray-clang'
a5f5a87482 Tests/RunCMake/if: Optionally skip checking write-only directory permissions
2a37015319 Tests/FortranModules: Skip submodules with Cray Fortran compiler
fa4ac78f4a Tests/FortranModules: Simplify check for submodules support
2c28321adb Tests: Combine conditions for BundleUtilities test
6dfd8e19b5 GetPrerequisites: Recognize CrayPE system libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10464
2025-03-13 09:46:51 -04:00
Brad King
b040b91b2b Merge topic 'cpack-project-path'
2d9ae9de96 CPack: Allow source-relative CPACK_PROJECT_CONFIG_FILE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10461
2025-03-13 09:44:20 -04:00
Brad King
a5f5a87482 Tests/RunCMake/if: Optionally skip checking write-only directory permissions
Some file systems do not support this.
2025-03-12 16:58:46 -04:00
Brad King
2a37015319 Tests/FortranModules: Skip submodules with Cray Fortran compiler
Issue: #18925
2025-03-12 16:39:23 -04:00
Brad King
fa4ac78f4a Tests/FortranModules: Simplify check for submodules support 2025-03-12 16:37:54 -04:00
Brad King
2c28321adb Tests: Combine conditions for BundleUtilities test 2025-03-12 16:37:54 -04:00
Nikita Nemkin
2d9ae9de96 CPack: Allow source-relative CPACK_PROJECT_CONFIG_FILE
Resolve relative CPACK_PROJECT_CONFIG_FILE explicitly at config
generation time. Otherwise, it will be resolved at runtime
relative to the CPack execution directory (which could be anything).

Additionally, issue a warning if reading PACK_PROJECT_CONFIG_FILE
fails at runtime.

Fixes: #15522
2025-03-12 20:37:01 +05:00
Brad King
85d1b74386 Merge topic 'pdb-name-genex-support'
15a1769bd8 GenEx: Add support for PDB_NAME and COMPILE_PDB_NAME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: nicolas loxol <nicolas.loxol@gmail.com>
Acked-by: Giacomo Rombaut <giacomo.rombaut@gmail.com>
Merge-request: !10418
2025-03-12 09:12:12 -04:00
Brad King
b7abc78e6c Merge topic 'pkg-config-import-populate'
28a92bde80 PkgC: Implement cmake_pkg_config IMPORT / POPULATE
7f172faca5 Help: Add install() section heading for common options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10393
2025-03-12 09:06:04 -04:00
Vito Gamberini
28a92bde80
PkgC: Implement cmake_pkg_config IMPORT / POPULATE
Issue: #26067
2025-03-11 11:24:07 -04:00
Giacomo Rombaut
15a1769bd8 GenEx: Add support for PDB_NAME and COMPILE_PDB_NAME
Closes: #26729
2025-03-11 10:28:12 -04:00
Brad King
6d260533e7 Merge topic 'link-information-with-decorated-diagnostics'
ee066d2271 LinkerId: Suppress decorated diagnostics during linker inspection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Nils Gladitz <nilsgladitz@gmail.com>
Merge-request: !10442
2025-03-11 09:40:28 -04:00
Brad King
dfbcaa9ee1 Merge topic 'link-information-with-decorated-diagnostics' into release-4.0
ee066d2271 LinkerId: Suppress decorated diagnostics during linker inspection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Nils Gladitz <nilsgladitz@gmail.com>
Merge-request: !10442
2025-03-11 09:40:24 -04:00
Marc Chevrier
ee066d2271 LinkerId: Suppress decorated diagnostics during linker inspection
Fixes: #26747
2025-03-10 10:36:27 -04:00
Brad King
cd38131f31 Merge topic 'path-resolver'
8dfc725cdb PathResolver: Add mode to collapse paths naively and look up on-disk case
75913fe430 PathResolver: Document in comments the on-disk case lookup on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10438
2025-03-09 10:48:46 -04:00
Brad King
8dfc725cdb PathResolver: Add mode to collapse paths naively and look up on-disk case
In CMake 3.31 and below, `CollapseFullPath` did this on Windows.  KWSys
has since stopped looking up the on-disk case in `CollapseFullPath` to
avoid disk access when most callers only need an in-memory operation.
We currently call `GetActualCaseForPath` explicitly when needed.

Add a mode to `cm::PathResolver` to combine these operations and cache
disk access behind the `System::ReadName` callback.  We will use this to
restore the way CMake 3.31 and below normalized input paths on Windows.

Issue: #26750
Issue: #20214
2025-03-07 18:22:46 -05:00
Brad King
5d510ae8a0 Merge topic 'genex-fix-target-pdb-base-name'
fe11677945 GenEx: Fix TARGET_PDB_FILE_BASE_NAME with PDB_NAME and DEBUG_POSTFIX
434c289f3b Help: Clarify references to <CONFIG>_POSTFIX target properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10431
2025-03-07 12:18:28 -05:00
Brad King
cdbeb7773e Merge topic 'ctest-regression'
712cb8cb14 ctest: Restore support for -T Test without dashboard configuration
e47dc29967 cmCTestStartCommand: Remove unnecessary code
f54699d31d cmCTest: De-duplicate working directory code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10432
2025-03-07 12:08:33 -05:00
Giacomo Rombaut
fe11677945 GenEx: Fix TARGET_PDB_FILE_BASE_NAME with PDB_NAME and DEBUG_POSTFIX
When `PDB_NAME` is explicitly set, the `<CONFIG>_POSTFIX` is not added
to the `.pdb` names.

Fixes: #26733
2025-03-06 11:40:59 -05:00
Daniel Pfeifer
712cb8cb14 ctest: Restore support for -T Test without dashboard configuration
Since commit 774fcbe49c (CTest: Base command line mode on top of
scripting commands, 2024-10-05, v4.0.0-rc1~653^2) we drive dashboard
client steps through `cmCTestHandlerCommand::ExecuteHandlerCommand`
instead of calling `ProcessHandler` directly.  This requires the
`BuildDirectory` to be known to establish a work directory.

Fixes: #26743
Co-authored-by: Brad King <brad.king@kitware.com>
2025-03-06 09:43:22 -05:00
Brad King
de7168c097 Merge topic 'remove-kfreebsd'
99c8abed55 kFreeBSD: Remove support for obsolete platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10410
2025-03-06 07:57:22 -05:00
Brad King
c7dbb2fe63 Merge topic 'FindPython-crosscompiling-consistency'
5c1521c54d FindPython: enforce artifacts consistency when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10413
2025-03-06 07:55:31 -05:00
Brad King
d84881dce6 Merge topic 'fix-cps-cmake-deps'
c3d279841b find_package: CPS component requirements != CMake components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10427
2025-03-06 07:53:27 -05:00
Matthew Woehlke
c3d279841b find_package: CPS component requirements != CMake components
Modify how CMake handles required components of a CPS transitive
dependency to not pass them as COMPONENTS if a CMake-script package is
found as the resolved dependency. This is necessary as many CMake-script
package description files do not treat component requests as target
requests (which, in CPS-land, they effectively are), but do implement
logic to mark themselves 'not found' if requested components are
missing. As a result, passing in the required targets as required
components is likely to cause the dependency to be spuriously not found
if it is only available via a CMake-script package configuration file.

Fix this by introducing a new 'required targets' concept, and by passing
CPS component requirements as both required targets and optional
components. The latter serves as a hint for packages that might provide
only a subset of themselves. The former is used to post-validate a
CMake-script package, or is folded on-the-fly into required components
when considering CPS packages.

Note that this functionality is not exposed to the user at this time,
and is only used when resolving transitive dependencies for a CPS
package.
2025-03-05 14:47:49 -05: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
Marc Chevrier
5c1521c54d FindPython: enforce artifacts consistency when cross-compiling
Fixes: #26696
2025-03-05 17:11:56 +01:00
Brad King
3524abf345 Merge topic 'build-database-fixes'
12d73c9f78 cmExperimental: recycle build database uuid
d02ca76184 cmDyndepCollation: record required modules to the build database
8a773168fd Tests/CXXModules: help diagnose build database errors
7ca4ac8e13 cmBuildDatabase: fix language comparison for visibility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10414
2025-03-05 08:32:50 -05:00
Brad King
ba3ad7c9e3 Merge topic 'ninja-acc-target-comments'
0122e02293 Ninja: Add COMMENT to custom command and target descriptions
30fb5b1b22 Ninja: add COMMENT to build statement descriptions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9484
2025-03-05 08:31:31 -05:00
Brad King
2586a2ce82 Merge topic 'ninja-many-subdirs'
5a36d0c9e7 Ninja: Fix regression with a large number of subdirectories
a30cf4a66a Tests/RunCMake/Configure: Split ninja-specific RerunCMake case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10420
2025-03-05 08:22:27 -05:00
Ben Boeckel
5a36d0c9e7 Ninja: Fix regression with a large number of subdirectories
Since commit f50fb77a4f (Ninja: Regenerate when test or install scripts
are missing, 2024-10-29, v4.0.0-rc1~516^2) the list of paths we pass to
`ninja -t restat` scales with the number of project subdirectories.
Run it in blocks to avoid "command line too long" errors, particularly
on Windows.

Fixes: #26738
2025-03-04 13:37:01 -05:00
Brad King
a30cf4a66a Tests/RunCMake/Configure: Split ninja-specific RerunCMake case
Split the test case from commit f50fb77a4f (Ninja: Regenerate when test
or install scripts are missing, 2024-10-29, v4.0.0-rc1~516^2) into a
dedicated case.
2025-03-04 17:46:31 +01:00
Brad King
0af6821799 Merge topic 'cpack-rpm-weak-deps-tags'
14baa13ab8 CPack/RPM: Add support for all weak dependency tags
847f515934 Tests: Simplify RunCMake.CPack_RPM.SUGGESTS expected output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10415
2025-03-04 08:47:25 -05:00
Ben Boeckel
12d73c9f78 cmExperimental: recycle build database uuid 2025-03-03 22:03:27 +01:00
Ben Boeckel
8a773168fd Tests/CXXModules: help diagnose build database errors
In tests that compare multiple files, knowing which file(s) errors come
from is difficult. Log the actual filepaths when this occurs to help
debugging.
2025-03-03 22:02:40 +01:00
Ben Boeckel
7ca4ac8e13 cmBuildDatabase: fix language comparison for visibility
Only C++ sources need checked for `CXX_MODULES` file set types, not the
other way around.
2025-03-03 22:00:23 +01:00
Ben Boeckel
0122e02293 Ninja: Add COMMENT to custom command and target descriptions
Fixes: #15461
2025-03-03 11:58:21 -05:00
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Brad King
67b6964efa Merge branch 'backport-license-rst' (early part) into license-rst 2025-03-03 10:42:50 -05:00
Kitware Robot
de273b2e11 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 09:56:07 -05:00
Brad King
2d42a5444f LICENSE: Rename Copyright.txt to LICENSE.rst
The name `LICENSE` is now more conventional.
Format as reStructuredText to improve rendering.
2025-03-03 09:55:56 -05:00
Balazs Kosaras
14baa13ab8 CPack/RPM: Add support for all weak dependency tags
Co-authored-by: Brad King <brad.king@kitware.com>
2025-03-03 09:09:15 -05:00
Brad King
847f515934 Tests: Simplify RunCMake.CPack_RPM.SUGGESTS expected output
Drop an optional part of the output that is never printed anymore.
2025-03-03 09:09:14 -05:00
Brad King
759ba45bdb Merge topic 'cpack-rpm-weak-deps'
283a48403f CPack/RPM: Fix detection of RPM support for weak dependencies
ab4e74ad0b CPack/RPM: Remove redundant conditions for presence of rpmbuild

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10403
2025-03-03 08:56:55 -05:00
Brad King
42755a6d30 Merge topic 'string-TIMESTAMP-2038'
be2f7097ca Tests: Skip string(TIMESTAMP) 2038 case on parisc 32-bit time_t

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10409
2025-03-02 16:57:17 -05:00
Brad King
be2f7097ca Tests: Skip string(TIMESTAMP) 2038 case on parisc 32-bit time_t
This was missed by commit 74519e1c83 (string(TIMESTAMP): Fix %s
placeholder for year 2038 on Windows, 2025-02-23).
2025-03-01 14:24:13 -05:00
Brad King
283a48403f CPack/RPM: Fix detection of RPM support for weak dependencies
Add a missing `find_program` call to populate `RPM_EXECUTABLE`.
This was left out of two previous changes that intended to query
the `rpm` executable:

* In commit 9b53eca317 (CPack/RPM: Fix weak dep support, 2021-06-29,
  v3.21.0-rc2~4^2), without `RPM_EXECUTABLE` the query always failed,
  so we were concluding that weak dependencies are not supported even
  when they are.

* In commit 488de6294a (CPack: correctly perform querytags on old
  versions of RPM, 2025-01-09, v4.0.0-rc1~182^2~3), without
  `RPM_EXECUTABLE` the query always failed.  This change has not
  yet been in a release anyway.

Also fix the test case for the "suggests" field to verify this.

Issue: #22350
Reported-by: Balazs Kosaras <balazskosaras@gmail.com>
2025-02-28 17:24:44 -05:00
Marc Chevrier
aed9dffdc9 FindPython: migrate tests to RunCMake framework 2025-02-28 17:55:24 +01:00