Commit Graph

37428 Commits

Author SHA1 Message Date
Brad King
4d51ad2b0a Merge topic 'install-DIRECTORY-exclude-empty'
b70ef48b27 install(DIRECTORY): Add EXCLUDE_EMPTY_DIRECTORIES option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10683
2025-05-07 09:45:42 -04:00
Kitware Robot
4cf27ab863 CMake Nightly Date Stamp 2025-05-07 00:07:49 -04:00
Hao Dong
b70ef48b27 install(DIRECTORY): Add EXCLUDE_EMPTY_DIRECTORIES option
EXCLUDE_EMPTY_DIRECTORIES option excludes empty directories under the
directory to install. A directory is considered not empty if and only if
the directory contains at least one file or one symbolic link or one
none-empty sub-directory.

Closes: #19189
2025-05-06 10:59:24 -04:00
Kitware Robot
6100efaa2f CMake Nightly Date Stamp 2025-05-06 00:05:39 -04:00
Brad King
8c7ab4e1e6 Merge topic 'asm-no-msvc'
14212494bb ASM: Guard exclusion of MSVC C/CXX compiler with a policy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10740
2025-05-05 08:55:20 -04:00
Brad King
93cbcd7596 Merge topic 'xcode-debugger-workdir'
149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
0f1b9ef32a Help: VS_DEBUGGER_WORKING_DIRECTORY precedence

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10736
2025-05-05 08:52:54 -04:00
Kitware Robot
528ce5a96c CMake Nightly Date Stamp 2025-05-04 00:09:35 -04:00
Brad King
14212494bb ASM: Guard exclusion of MSVC C/CXX compiler with a policy
Since commit 6baf65ec46 (ASM: Do not consider MSVC C/CXX compiler for
generic ASM, 2025-04-08) we no longer mistake `cl` for an assembler.
However, some projects unconditionally enable ``ASM``, which worked
on Windows only due to that bug.  Restore compatibility with such
projects by guarding the change behind a new policy ``CMP0194``.

Fixes: #26907
Issue: #26617
2025-05-03 13:18:19 -04:00
Craig Scott
149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
This also means when XCODE_SCHEME_WORKING_DIRECTORY is
set and a Xcode generator is used, that property will be used when
writing the debugger field in the file API replies.

Fixes: #26909
2025-05-03 10:16:15 -04:00
Brad King
67f86c7db8 Merge topic 'clang-macos-sdk'
bf1bb62e74 macOS: Restore support for LLVM/Clang without explicit CMAKE_OSX_SYSROOT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10734
2025-05-03 10:02:18 -04:00
Brad King
e49dc061c2 Merge topic 'clang-macos-sdk' into release-4.0
bf1bb62e74 macOS: Restore support for LLVM/Clang without explicit CMAKE_OSX_SYSROOT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10734
2025-05-03 10:02:16 -04:00
Kitware Robot
7554926e54 CMake Nightly Date Stamp 2025-05-03 00:06:19 -04:00
Brad King
bf1bb62e74 macOS: Restore support for LLVM/Clang without explicit CMAKE_OSX_SYSROOT
In commit 7b19531291 (macOS: Do not pass any SDK/-isysroot to compilers
by default, 2024-11-06, v4.0.0-rc1~511^2) we broke support for using
upstream LLVM/Clang to build for macOS because the compiler has no
default sysroot.  Handle empty `CMAKE_OSX_SYSROOT` with LLVM/Clang by
falling back to the macOS SDK reported by `xcrun --show-sdk-path` .

Fixes: #26863
2025-05-02 13:49:40 -04:00
Brad King
52903a0ae4 Merge topic 'find-event-refactor'
fdccb8846c cmFindCommonDebugState: adopt event writing logic
716dfd3b1e cmFindCommon: track debug state as an object
c6d097135d cmFindBaseDebugState: factor out a base class
bd5cb1f8e6 cmFindCommon: use `DebugModeEnabled` to query for debug mode
76ea613f4c cmFindBaseDebugState: get the command name directly from the object

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10713
2025-05-02 11:07:02 -04:00
Brad King
0556c1b455 Merge topic 'fix-find-performane-regression'
bb3a348def find_package: Fix performance regression in 4.0.0 release

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10731
2025-05-01 15:50:28 -04:00
Brad King
edec9fbf57 Merge topic 'fix-find-performane-regression' into release-4.0
bb3a348def find_package: Fix performance regression in 4.0.0 release

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10731
2025-05-01 15:50:24 -04:00
Matthew Woehlke
bb3a348def find_package: Fix performance regression in 4.0.0 release
In commit e90f60f864 (find_package: Don't glob certain macOS paths,
2024-10-23, v4.0.0-rc1~579^2~1) we changed the name matching logic of
`find_package` to check if a possible match is a directory before
checking whether the name is a match.  In some situations, this results
in unnecessarily calling `stat` for a very large number of files, which
can be extremely slow on some systems (especially Windows).  Fix this by
making the check the last thing we do before accepting a possible match.

Fixes: #26817
2025-05-01 14:48:33 -04:00
Brad King
74e677f62b Merge topic 'clang-libstdcpp-support'
5750fcd7b4 ci: enable `import_std23` module compilation with clang
52e2785018 experimental/CXXModules: recycle the UUID
28333c4516 Clang/CXXImportStd: support `-stdlib=libstdc++`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10727
2025-05-01 08:40:49 -04:00
Brad King
6514fdebab Merge topic 'fix-cps-relative-name-mangling'
9081e73104 CPS: Fix mangling of relative requirement names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10729
2025-05-01 08:31:20 -04:00
Ben Boeckel
fdccb8846c cmFindCommonDebugState: adopt event writing logic
This lays the groundwork for `find_package` also using the same
triggering logic.
2025-05-01 12:47:24 +02:00
Kitware Robot
0823acb5ef CMake Nightly Date Stamp 2025-05-01 00:04:14 -04:00
Matthew Woehlke
9081e73104 CPS: Fix mangling of relative requirement names
CPS names look like `[package]:component`, which needs to get mangled
into `package::component` to match CMake's convention. This was
implemented correctly for fully qualified component requirements, but
relative names were not being properly mangled. Adjust handling of
relative names to correctly translate from CPS to CMake convention.
2025-04-30 11:56:09 -04:00
Brad King
07a30dc075 Merge topic 'GNUInstallDirs-get-absolute-install-dir'
cc6dbd194c GNUInstallDirs: Cache CMAKE_INSTALL_* with leading usr/ for install prefix /
a7fcb1320c GNUInstallDirs: Make GNUInstallDirs_get_absolute_install_dir a function
03e796f9ab GNUInstallDirs: Move the common handler for `SYSCONFDIR` and `LOCALSTATEDIR`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10584
2025-04-30 09:52:43 -04:00
Brad King
8946984340 Merge topic 'avoid-duplicates'
e991145430 Source: Avoid duplicate calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10725
2025-04-30 09:49:46 -04:00
Brad King
ced61f69cb Merge topic 'macos-curl-backend'
5d3f931956 Merge branch 'backport-macos-curl-backend' into macos-curl-backend
1e1129c6fe macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10724
2025-04-30 09:39:50 -04:00
Brad King
f70aed86f1 Merge topic 'macos-curl-backend' into release-4.0
1e1129c6fe macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10724
2025-04-30 09:39:48 -04:00
Ben Boeckel
52e2785018 experimental/CXXModules: recycle the UUID
Now that `clang -stdlib=libstdc++` is supported.
2025-04-30 13:48:13 +02:00
Kitware Robot
5d87f4f47c CMake Nightly Date Stamp 2025-04-30 00:05:12 -04:00
Ben Boeckel
716dfd3b1e cmFindCommon: track debug state as an object
This also means that the `DebugState` instances do not need to ask if
debug mode is enabled: if they exist, it is enabled.
2025-04-29 20:10:43 +02:00
Ben Boeckel
c6d097135d cmFindBaseDebugState: factor out a base class
This will be used to share logic with `find_package` writing events.
2025-04-29 20:10:43 +02:00
Ben Boeckel
bd5cb1f8e6 cmFindCommon: use DebugModeEnabled to query for debug mode
This simplifies changing how debug mode is represented.
2025-04-29 20:10:43 +02:00
Ben Boeckel
76ea613f4c cmFindBaseDebugState: get the command name directly from the object 2025-04-29 20:10:43 +02:00
Cristian Le
cc6dbd194c GNUInstallDirs: Cache CMAKE_INSTALL_* with leading usr/ for install prefix /
As a consequence, `GNUInstallDirs_get_absolute_install_dir` does not
alter the `var` argument (the relative path argument).

Closes: #26834
Signed-off-by: Cristian Le <git@lecris.dev>
2025-04-29 13:49:42 -04:00
Brad King
5d3f931956 Merge branch 'backport-macos-curl-backend' into macos-curl-backend 2025-04-29 11:50:17 -04:00
Gregor Jasny
1e1129c6fe macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend
In commit f2596dfa0e (macOS: Work around bug in system curl 8.{3,4,5}
LibreSSL backend, 2024-07-16, v3.30.1~2^2) we tried to prefer
`secure-transport` on problematic versions of curl.  However, the
`curl_global_sslset` setting must be applied before every
`curl_global_init` call, not just the first one.  Otherwise a
second (or subsequent) download won't apply the work-around.
2025-04-29 11:49:49 -04:00
Brad King
9dcb87f87a Merge topic 'patch-FindXCTest'
72e5ebcbd3 FindXCTest: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10719
2025-04-29 11:06:04 -04:00
Brad King
e94ace226b Merge topic 'configure-log-find-v1'
a3f273b657 cmFindBase: Create `find-v1` configure log events
58b5d41a4f cmFindBase: Track initial state with an `enum`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10621
2025-04-29 10:54:10 -04:00
Vitaly Stakhovsky
e991145430 Source: Avoid duplicate calls 2025-04-29 06:51:28 -04:00
Kitware Robot
d85041c830 CMake Nightly Date Stamp 2025-04-29 00:07:00 -04:00
Brad King
456cff9ebd Merge topic 'project-compat-version'
0138df29dc project: add COMPAT_VERSION keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10696
2025-04-28 11:20:01 -04:00
Ben Boeckel
a3f273b657 cmFindBase: Create find-v1 configure log events
Record `find_` command events in the configure log, except
`find_package` as it is far more complicated (and will have its own
event kind).

Note that testing only generates the events of interest, there is no
verification. Also note that testing that the "found" to "notfound"
transition causes an event is not testable because a truthy value in the
variable skips any kind of verification or other logic beyond
normalization.

Co-Authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
See: #24833
2025-04-28 13:55:36 +02:00
Ben Boeckel
58b5d41a4f cmFindBase: Track initial state with an enum
When logging a `WriteFindBaseEvent`, one of the triggers to log is the
change in the "found" status of a `find_` command. Track the difference
between "undefined", "found", and "tried before, but not found" so that
the transition can be detected reliably.

Co-Authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
2025-04-28 11:47:32 +02:00
Kitware Robot
9debf90d87 CMake Nightly Date Stamp 2025-04-28 00:04:05 -04:00
Peter Kokot
72e5ebcbd3 FindXCTest: Update documentation
- Module documentation synced with other similar find modules.
- Added examples section.
- Added note about Swift Testing framework, which supersedes the XCTest.
- Added note about the XCTEST target property and synced docs a bit.
- Used word "commands" instead of "macros" or "functions".
2025-04-28 00:12:14 +02:00
Kitware Robot
b73c194b98 CMake Nightly Date Stamp 2025-04-27 00:04:39 -04:00
Brad King
1cd89e65d7 Merge topic 'ci-fedora-42'
36d96ce044 ci: Drop outdated HDF5 Fortran compiler wrapper patch from Fedora jobs
5b21de16a0 ci: use Fedora 42 images and environments
efa818f661 ci: update Fedora base images to Fedora 42
585e1655c2 ci: Update cppdap in extdeps jobs
01d0f037b6 ci: Remove superuser tools from PATH in Linux jobs
8b1b201154 clang-tidy: suppress misc-redundant-expression lint on macro expansion
3d0ac2dafa clang-tidy: fix bugprone-unhandled-self-assignment lint
16455374cf Source: Suppress gcc 15 -Wmaybe-uninitialized in std::function
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10711
2025-04-26 10:00:15 -04:00
Kitware Robot
6cab79c7bb CMake Nightly Date Stamp 2025-04-26 00:04:20 -04:00
Vito Gamberini
0138df29dc project: add COMPAT_VERSION keyword
Fixes: #26893
2025-04-25 13:42:11 -04:00
Brad King
cd7cbcc8fb Merge topic 'ctest_instrumentation_outputsizes'
2df19bec2b instrumentation: include output sizes in CTest XML

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Martin Duffy <martin.duffy@kitware.com>
Merge-request: !10712
2025-04-25 08:55:35 -04:00
Kitware Robot
3570c66d52 CMake Nightly Date Stamp 2025-04-25 00:04:27 -04:00