Commit Graph

12266 Commits

Author SHA1 Message Date
Brad King
edba4bf64c Merge topic 'patch-TEST_INCLUDE_FILE'
1fa89aa3e4 TEST_INCLUDE_FILE: Replace with TEST_INCLUDE_FILES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10514
2025-03-25 10:52:40 -04:00
Brad King
0e6a2068f6 Merge topic 'ctest-exit'
46a0c04284 CTest: Allow setting exit code in ctest scripts
47277616d8 Tests/CTestTestChecksum: Add missing CMakeLists.txt file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9872
2025-03-24 10:22:18 -04:00
Peter Kokot
1fa89aa3e4
TEST_INCLUDE_FILE: Replace with TEST_INCLUDE_FILES
The TEST_INCLUDE_FILE directory property got deprecated in CMake 3.10
and TEST_INCLUDE_FILES should be used instead.
2025-03-24 14:20:27 +01:00
Brad King
9e3cf9760e Merge topic 'diab_toolchain_tests'
7624d0110b Diab: Add tests covering the Diab toolchains

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10412
2025-03-21 08:49:30 -04:00
Daniel Pfeifer
46a0c04284
CTest: Allow setting exit code in ctest scripts 2025-03-20 16:31:49 +01:00
Brad King
47277616d8
Tests/CTestTestChecksum: Add missing CMakeLists.txt file 2025-03-20 15:43:42 +01:00
Brad King
0a69e10cbf Merge topic 'FindVulkan-debug-libraries'
74bb57cae9 FindVulkan: Search for dxc / volk debug libraries
7c7c7721e9 FindVulkan: Fix test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10475
2025-03-20 09:15:16 -04:00
Brad King
97246b2083 Merge topic 'ctest-schedule-random-seed'
d3455f38de ctest: Add option to specify the --schedule-random seed
3dc8e59bdc ctest: Record --schedule-random seed in test log

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Nadav Tenenbaum <tnadav@gmail.com>
Acked-by: Hagai Cohen <hagai.co@gmail.com>
Acked-by: Toplica Tanasković <toplicius@gmail.com>
Acked-by: Itay Bookstein <itay.bookstein@nextsilicon.com>
Acked-by: Ilan Tayari <ilan@nextsilicon.com>
Acked-by: Adnan Hodzic <adnan.hodzic@nextsilicon.com>
Merge-request: !10488
2025-03-20 09:11:24 -04:00
lumina37
7c7c7721e9 FindVulkan: Fix test
Co-authored-by: Juan Ramos <cmake@jpr.mozmail.com>
2025-03-19 09:14:32 -04:00
Brad King
deb44bdf73 Merge topic 'instrumentation-snippet-names'
39f365ec3c instrumentation: Unique snippet file names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10491
2025-03-19 09:05:56 -04:00
Daniel Goldberg
d3455f38de ctest: Add option to specify the --schedule-random seed
When `--schedule-random` is used in automated CI jobs, failures may
occur due to test order.  We now log the seed.  Provide a way for
developers to re-run the same order by specifying the seed.

Fixes: #26760
Co-authored-by: Brad King <brad.king@kitware.com>
2025-03-18 14:17:59 -04:00
Martin Duffy
39f365ec3c instrumentation: Unique snippet file names
Updates the hash in snippet file naming to take the ProcessId into account
so that snippets with identical commands don't risk a collision in filename.

Additionally, this adds a `workingDir` to snippet files so that snippets with
identical commands can be more easily differentiated, such as with install
snippets.
2025-03-18 13:23:02 -04:00
Sanjiv Gupta
7624d0110b Diab: Add tests covering the Diab toolchains
Run the tests only if enabled explicitly by an undocumented cache
entry.  We will enable it on hosts known to have the toolchains.

Closes: #26735
2025-03-18 13:18:55 -04:00
Brad King
6987e87032 Merge topic 'json-parse-errors'
bed7e90bae cmJSONState: Use StructuredErrors when available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10472
2025-03-18 09:54:15 -04:00
Brad King
953e5ec831 Merge branch 'backport-export-multiple-set-not-installed' 2025-03-17 18:04:53 -04:00
Martin Duffy
d723409e8e export: Allow multiple exports when only one export is installed
Since commit c8997fc046 (export: Allow depending on targets exported
multiple times, 2024-12-26, v4.0.0-rc1~241^2), it is possible to depend
on a target exported multiple times so long as the target is exported in
only one set and with a consistent namespace.  However, as a
side-effect, a target could not be in multiple export sets even if only
one of those sets was installed.

Update the check so that uninstalled export sets do not count towards a
target being exported multiple times.
2025-03-17 18:01:30 -04:00
Martin Duffy
bed7e90bae cmJSONState: Use StructuredErrors when available
When the version of JsonCpp permits it, use StructuredErrors to generate
error messages for parse errors in the same style as other CMake-generated
JSON error messages.

Fixes: #26717
2025-03-17 14:17:34 -04:00
Brad King
c005babf89 Merge topic 'pkgc-name-prefix'
f59bab006d PkgC: Add NAME and PREFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10473
2025-03-17 11:52:18 -04:00
Vito Gamberini
f59bab006d
PkgC: Add NAME and PREFIX
Fixes: #26067
2025-03-14 15:17:27 -04:00
Brad King
2604f5d8b3 Merge topic 'json-errors-filename'
f134468a98 JSON: Improve JSON error message formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10463
2025-03-14 12:17:02 -04:00
Brad King
718886fa60 Merge topic 'FortranCInterface-Cray'
ce45045d50 FortranCInterface: Add support for Cray module mangling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10466
2025-03-14 12:14:16 -04:00
Brad King
40e685d76c Merge topic 'cps-fix-default-configs'
63c96e76f9 cmPackageInfoReader: Fix default configurations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10469
2025-03-14 12:06:42 -04:00
Brad King
df2ec408c9 Merge topic 'cps-fix-default-configs' into release-4.0
63c96e76f9 cmPackageInfoReader: Fix default configurations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10469
2025-03-14 12:06:40 -04:00
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
Matthew Woehlke
63c96e76f9 cmPackageInfoReader: Fix default configurations
Fix two minor issues with how default configurations are set from CPS
packages. First, imported configurations were (appropriately) being
converted to upper case, but default configurations weren't. Second,
default configurations were being set only after importing components
from the root package configuration file, resulting in configurations
specified in the root file preceding the default configurations.
2025-03-13 14:27:58 -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
Victor Brunini
ce45045d50 FortranCInterface: Add support for Cray module mangling
Cray Fortran uses mangling of the form `my_sub$my_module_` with the
subroutine name first.  Teach FortranCInterface to detect this case.
Add `FortranCInterface_MODULE_{,_}ORDER` result variables to report it.

With optimizations on, Cray Fortran inlines the module subroutine into
the calling object, so our symbol with the `INFO` string is not used.
Add a directive to suppress inlining to avoid this.
2025-03-13 10:18:02 -05:00
Martin Duffy
f134468a98 JSON: Improve JSON error message formatting
This improves the output of JSON-related error messages. It adds the filename to
the output and excludes the column number.

This is particularly useful when there are multiple JSON files being read that
could be responsible for an error, ie CMakePresets.json and
CMakeUserPresets.json, or multiple instrumentation queries.

Issue: #26717
2025-03-13 10:44:31 -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