Commit Graph

7161 Commits

Author SHA1 Message Date
Brad King
4c1a6f2e23 Merge topic 'ci-fedora-39'
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39
9283b20659 ci: Suppress CPack/RPM tests pending fix for Fedora 39
18145e8745 ci: Update FindMPI test environment for mpich on Fedora 39
a8be80ccf2 ci: Drop now-unnecessary Clang rules for CXXModules tests
99238b23e9 ci: use Fedora 39 images and environments
57eadec617 ci: update Linux image to Fedora 39
653262162c clang-tidy module: Update to build against LLVM/Clang 17
2cf9a65835 clang-tidy: ignore warnings new in version 17
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8983
2023-11-20 08:10:37 -05:00
Brad King
3401d0b3bb Merge topic 'doc-typo'
328a1b5b73 Help: Fix spelling of CMAKE_EXTRA_INCLUDE_FILES in 3.6 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8985
2023-11-19 11:57:42 -05:00
Brad King
aea838cf41 Merge topic 'cpack-wix-installscope'
60661f6770 CPack/WiX: Make InstallScope configurable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8954
2023-11-19 11:55:30 -05:00
Brad King
1f7a653e90 Merge topic 'swift-compilation-mode'
0f80101b73 Tests: Update Swift tests to use CMP0157 NEW behavior
c1d787e473 Swift: Add abstraction for compilation mode
c39384f540 Tests: Simplify RunCMake.Swift conditions to enable use of Swift

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8918
2023-11-19 11:47:37 -05:00
Peter Kokot
328a1b5b73 Help: Fix spelling of CMAKE_EXTRA_INCLUDE_FILES in 3.6 release notes 2023-11-19 11:33:08 -05:00
Brad King
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39 2023-11-17 11:35:41 -05:00
Brad King
2744f14db1 codespell: Fix typos 2023-11-17 09:58:21 -05:00
Brad King
f2776ac063 codespell: Revise release note about short-lived field to avoid misspelling 2023-11-17 09:58:21 -05:00
Evan Wilde
c1d787e473 Swift: Add abstraction for compilation mode
Add a `CMAKE_Swift_COMPILATION_MODE` variable and corresponding
`Swift_COMPILATION_MODE` target property to control the compilation
mode.  Select among `wholemodule`, `singlefile`, and `incremental`.

Add policy CMP0157 to remove the default `-wmo` flags in favor of the
abstract setting.

Issue: #25366
2023-11-17 08:43:21 -05:00
Brad King
6f8532fbfa Merge topic 'autogen-rsp'
232610e60e Autogen: Use new API for limiting autogen command line lengths
7a07887055 Autogen: Add support for response files for moc predef targets
7eb5ab2c63 Autogen: Generalize MaybeWriteMocResponseFile to MaybeWriteResponseFile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8944
2023-11-17 08:23:18 -05:00
Max Gaukler
60661f6770 CPack/WiX: Make InstallScope configurable
Add a new `CPACK_WIX_INSTALL_SCOPE` variable to set the `InstallScope`
when using the default WiX template.  Set the default to the bug-free
value `perMachine`.

Fixes: #20962
2023-11-16 14:15:38 -05:00
tophoo
7a07887055 Autogen: Add support for response files for moc predef targets
Add support for response files for moc predef targets and make the limit when
to use response files for autogen targets configurable.
2023-11-16 16:29:02 +01:00
Brad King
2c923a7e28 Merge topic 'install-export-xcframework'
37bc3400cd CMakePackageConfigHelpers: Add generate_apple_platform_selection_file()
256bb0cc40 install(EXPORT): Add ability to point to .xcframework file
a90968e044 cmExportBuildFileGenerator: Add structs for target exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !8969
2023-11-16 09:13:16 -05:00
Brad King
e48f2e69b5 Help: Clarify file() command multi-value argument placeholders
Use `<placeholder>...` syntax to imply "zero or more", as we do elsewhere.
2023-11-15 10:56:17 -05:00
Brad King
5bc9c2d6ac Merge branch 'release-3.27' 2023-11-15 09:44:17 -05:00
Brad King
cd74246331 Merge branch 'release-3.27' into release-3.28 2023-11-15 09:43:56 -05:00
Kyle Edwards
37bc3400cd CMakePackageConfigHelpers: Add generate_apple_platform_selection_file()
Issue: #25262
2023-11-15 09:10:58 -05:00
Kyle Edwards
256bb0cc40 install(EXPORT): Add ability to point to .xcframework file
Issue: #25262
2023-11-15 09:10:58 -05:00
Brad King
9cfff766eb CMake 3.27.8 2023-11-15 08:55:18 -05:00
Brad King
105ac2670b Merge topic 'doc-find_package-advice'
d007d304ff Help: FetchContent FIND_PACKAGE_ARGS REQUIRED usually inappropriate
6341267780 Help: Note ways CMAKE_..._FIND_PACKAGE_... vars can break projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8951
2023-11-15 08:38:54 -05:00
Kyle Edwards
0ad8fc5a63 FetchContent: Set CMAKE_EXPORT_FIND_PACKAGE_NAME 2023-11-13 11:07:53 -05:00
Kyle Edwards
c6e6861e63 install(EXPORT): Export find_dependency() calls
Issue: #20511
Co-Authored-by: Brad King <brad.king@kitware.com>
Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
2023-11-13 11:07:52 -05:00
Kyle Edwards
e62a3b8625 Help/export: Add signature directives 2023-11-13 11:07:52 -05:00
Brad King
5e79703f93 Merge topic 'make-test-depend-on-all'
5e0c1777a3 Optionally make `test` target depend on `all`
eaa00d4dfa Tests: Add case to verify that 'make test' does not 'make all'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !8956
2023-11-13 09:53:04 -05:00
William Sciaroni
5e0c1777a3 Optionally make test target depend on all
Fixes: #8774
2023-11-10 13:19:11 -05:00
Marc Chevrier
7b99c42e57 Link step: Enable to configure deduplication of libraries
Some platforms, Apple or Windows for instance, do not require to duplicate
static libraries to resolve mutual dependencies. Moreover, Xcode version 15
emits a warning if a library is duplicated.
On Windows, enable a better control of libraries order.

Fixes: #20722, #25297
2023-11-09 19:20:40 +01:00
Brad King
d6b796854b Merge topic 'doct'
7b4983536a Help:test prop WILL_FAIL clarify and example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8937
2023-11-08 10:39:02 -05:00
scivision
ae72b04418 Help: Document when <LANG>_COMPILER_ID genex learned to support multiple ids
It was added in CMake 3.15.
2023-11-07 13:47:43 -05:00
Brad King
92cc1f3b62 Merge topic 'Ninja-use-depslog'
bb7a0497ef cmTransformDepfile: warn when a depfile is not written to
c22c473bde Tests/Ninja*/CustomCommandDepfile: check that deps are in the database
b0177003e1 cmGlobalNinjaGenerator: tell `ninja` to actually read the depfile
45eff9145e cmAddCustomCommandCommand: use `cmStrCat`
c6445c615b Tests/RunCMake/Ninja: fix subdir prefix check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8911
2023-11-07 09:07:46 -05:00
Craig Scott
6341267780 Help: Note ways CMAKE_..._FIND_PACKAGE_... vars can break projects
Issue: #23779
2023-11-07 21:38:10 +08:00
scivision
7b4983536a Help:test prop WILL_FAIL clarify and example
This makes the WILL_FAIL behavior explicit. Users could be confused
because some other build systems treat equivalent test properties
as allowing a failure, but still pass on a passing test, and may
catch SIGABRT unlike CMake.

We show an example of how to wrap a test so that sigabrt, segfault,
etc. are also handled by WILL_FAIL.
2023-11-06 21:46:17 -05:00
Brad King
530deed998 Merge topic 'cmake-E-cat-stdin'
ab72846794 cmake -E cat: Add ability to print standard input

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8942
2023-11-06 10:35:45 -05:00
權少
c5388bd320 CMakeFindPackageMode: Link to cmake --find-package documentation 2023-11-03 10:17:38 -04:00
Kyle Edwards
ab72846794 cmake -E cat: Add ability to print standard input 2023-11-03 09:03:25 -04:00
Brad King
0f02655bb0 Merge topic 'if-check-file-permissions'
337bc5662c if(): add operators IS_READABLE, IS_WRITABLE and IS_EXECUTABLE.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8908
2023-11-02 09:31:01 -04:00
Ben Boeckel
b0177003e1 cmGlobalNinjaGenerator: tell ninja to actually read the depfile
But only do so if the depfile is not specified as an output of the
command. Otherwise the command will out-of-date itself as `ninja`
deletes depfiles that it incorporates into the database and a missing
output will cause the command to run again.
2023-11-01 14:08:18 -04:00
Brad King
2e16fca2be Merge topic 'cxxmodules-cmp0155-graceful-fallback-without-scanner'
1f507580a1 cmGlobalGenerator: give context about module queries
889aa0354a CMP0155: ignore scanning for sources if no scanner is available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8925
2023-11-01 13:48:15 -04:00
Marc Chevrier
337bc5662c if(): add operators IS_READABLE, IS_WRITABLE and IS_EXECUTABLE.
Offers possibility to check for file or directory permissions.
2023-11-01 14:53:31 +01:00
Ben Boeckel
889aa0354a CMP0155: ignore scanning for sources if no scanner is available
This allows for a more graceful transition for projects using C++20
without scanner support (e.g., Clang 15 or GCC 13). While newer
compilers will (needlessly) scan, it allows C++20-using projects to use
older compilers without having to set `CMAKE_CXX_SCAN_FOR_MODULES` to
support newer CMake minimum versions.

Fixes: #25357
2023-11-01 09:52:08 -04:00
Ben Boeckel
59c2143920 Help/IMPORTED_LOCATION: link to LOCATION_<CONFIG> docs 2023-10-28 10:04:16 -04:00
Brad King
f55043f87e Merge topic 'unity-build-objc'
e218db1a90 Unity: Enable UNITY_BUILD for OBJC and OBJCXX files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8906
2023-10-27 09:06:44 -04:00
Rob Raguet-Schofield
e218db1a90 Unity: Enable UNITY_BUILD for OBJC and OBJCXX files 2023-10-26 10:01:41 -04:00
Marc Chevrier
c26c6ac488 Link Step: compute effective linker used by the compiler
Extract the effective linker during the computation of implicit artifacts
delivered by the compiler to the linker.
Define various variables describing the linker:
* CMAKE_<LANG>_COMPILER_LINKER
* CMAKE_<LANG>_COMPILER_LINKER_VERSION
* CMAKE_<LANG>_COMPILER_LINKER_ID
* CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT

This is complementary to feature introduced by commit 96a953b1ed
(Add options to specify linker tool, 2023-09-27).

Fixes: #17596, #18209, #25344
2023-10-24 08:34:50 -04:00
Brad King
e93ad8eecd Merge topic 'ninja-better-order-depends'
ed45432571 cmNinjaTargetGenerator: do not order-depend on C++ module sources
0973cd6702 cmNinjaTargetGenerator: use the file set visibility API
4625170925 cmFileSet: add a query for includeable file set types
51f9d9f0a2 cmNinjaTargetGenerator: avoid traversing old outputs repeatedly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8902
2023-10-23 09:39:23 -04:00
Brad King
34c51a385b Merge topic 'ninja-better-order-depends' into release-3.28
ed45432571 cmNinjaTargetGenerator: do not order-depend on C++ module sources
0973cd6702 cmNinjaTargetGenerator: use the file set visibility API
4625170925 cmFileSet: add a query for includeable file set types
51f9d9f0a2 cmNinjaTargetGenerator: avoid traversing old outputs repeatedly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8902
2023-10-23 09:39:22 -04:00
Brad King
45b41722d6 Merge topic 'doc-modules-deprecated'
75ca6e17f2 Help: Move some deprecated modules to the dedicated sections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8903
2023-10-23 09:38:32 -04:00
權少
75ca6e17f2 Help: Move some deprecated modules to the dedicated sections 2023-10-20 09:01:33 -04:00
Brad King
35c7e237e7 Merge topic 'ci-linkcheck'
54e06c601d Help: Replace link with its http redirect

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8898
2023-10-20 08:43:04 -04:00
Ben Boeckel
ed45432571 cmNinjaTargetGenerator: do not order-depend on C++ module sources
C++ module sources should not be included by any other TUs, so their
presence cannot matter for order-only dependencies of the entire target.
Exclude them.

Update CMP0154 to take this into consideration and add tests to the
`CXXModules` suite (which already deals with module support detection).
2023-10-20 07:18:33 -04:00
Brad King
d705ca9d34 Merge topic 'doc-cmake-presets-8'
d3978a3835 Help: Document cmake-presets version 8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8899
2023-10-19 11:31:55 -04:00