Commit Graph

15586 Commits

Author SHA1 Message Date
Brad King
4ae24357ad Merge topic 'patch-CMakeDependentOption-script-mode'
8b25e11fed CMakeDependentOption: Document project and script mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11192
2025-09-16 09:53:39 -04:00
Brad King
ae0f7f8498 Merge topic 'findwxwidgets'
96f6382357 FindwxWidgets: updates for wxWidgets 3.3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vadim Zeitlin <vz-kitware@zeitlins.org>
Merge-request: !11190
2025-09-16 09:51:52 -04:00
Brad King
a66c325ec1 Merge topic 'patch-FindImageMagick-version'
032e829b23 FindImageMagick: Add ImageMagick_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11187
2025-09-16 09:50:27 -04:00
Brad King
c4fe74ba3d Merge topic 'python-android-link'
1507491c25 FindPython: link modules against libpython on Android

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11153
2025-09-16 09:16:35 -04:00
Brad King
c325904eb1 Merge topic 'vs2026'
47c784ba8a Help: Add release note for Visual Studio 18 2026 generator
cd46d8ec84 Merge branch 'backport-vs2026' into vs2026
3392b371e2 VS: Add Visual Studio 18 2026 generator
7f0883ac04 VS: Remove unused generator code
6f0d245083 VS: Fix `/dynamicdeopt` flag table entry order for v145 toolset
398ce8af72 VS: Remove `/guard:cf` from v145 link flag table
5c9085d876 VS: Remove `/MERGE` from v145 link flag table
fe5c78310c VS: Map the link `/debug` flag for v145 toolset
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11168
2025-09-16 09:00:10 -04:00
Brad King
1bdf6d2db6 Merge topic 'lfortran-0.55'
3b85cc1a8e Tests: Extend RunCMake.ParseImplicitLinkInfo for LFortran 0.55.0
7e8f76dad2 LFortran: Update flags renamed by version 0.55

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11184
2025-09-16 08:50:44 -04:00
Christopher Albert
7e8f76dad2 LFortran: Update flags renamed by version 0.55
The `--generate-object-code` flag is now `--separate-compilation`.

Fixes: #27225
2025-09-15 20:34:16 -04:00
Brad King
2337bfc562 Merge topic 'cxxmodules-custom-import-std-metadata-file'
85e536b5eb gitlab-ci: test `CMAKE_CXX_STDLIB_MODULES_JSON` in CI
42621a232b Tests/CXXModules: add a label
2f101b2c8c Tests/CXXModules: support testing with custom stdlib json locations
6c178a4ae3 Tests/RunCMake: add newlines in CXXModules options
2b85541e39 cxximportstd: support setting the `import std` metadata location

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11175
2025-09-15 11:39:52 -04:00
Brad King
cd46d8ec84 Merge branch 'backport-vs2026' into vs2026 2025-09-15 11:33:57 -04:00
Brad King
3392b371e2 VS: Add Visual Studio 18 2026 generator
Closes: #27213
2025-09-15 11:31:02 -04:00
Peter Kokot
8b25e11fed CMakeDependentOption: Document project and script mode
This module also works in script mode. This is a sync with the option()
command which mentions how the variable behaves in project and script
mode.
2025-09-14 23:38:51 +02:00
Maarten Bent
96f6382357 FindwxWidgets: updates for wxWidgets 3.3
wxWidgets 3.3 changed some win32 libraries from dynamic to static loading.
Update the list of win32 libraries to the list used upstream.
wsock32 is not used in wxWidgets 3.3 anymore, but keep it for older wxWidgets versions.

wxWidgets 3.3 also adds the wxwebp library. Add it, and its sub-libraries, to wxWidgets_COMMON_LIBRARIES.
2025-09-14 17:52:58 +02:00
Peter Kokot
032e829b23 FindImageMagick: Add ImageMagick_VERSION
This deprecates the ImageMagick_VERSION_STRING result variable.

Additionally, ImageMagick version is now determined by either mogrify
executable (if available), or from the `<magick/version.h>` header.

Issue: #27088
2025-09-13 23:48:05 +02:00
Malcolm Smith
1507491c25 FindPython: link modules against libpython on Android 2025-09-13 12:53:18 +01:00
Peter Kokot
395452ad1d ExternalProject: Document module inclusion in project mode
This module can be only included in project mode (when `CMAKE_ROLE` is
`PROJECT`).

Issue: #26555
2025-09-12 03:38:42 +02:00
Ben Boeckel
2b85541e39 cxximportstd: support setting the import std metadata location
Some deployments may not be able to discover the metadata file reliably
(e.g., custom `clang` builds on macOS while using the SDK's stdlib or
distribution bugs). Allow users to force the location so that
compiler-driven detection doesn't have to bend over backwards for
unforeseen bugs.
2025-09-11 18:03:00 -04:00
Brad King
ea539e2de6 Merge topic 'GNUInstallDirs-cached-default'
2e88a3efc2 GNUInstallDirs: Fix regression on -DCMAKE_INSTALL_<dir>=<default> in /usr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11167
2025-09-11 12:06:59 -04:00
Cristian Le
2e88a3efc2 GNUInstallDirs: Fix regression on -DCMAKE_INSTALL_<dir>=<default> in /usr
Fix commit 9789f7d05e (GNUInstallDirs: Add internal helper to compute
specific defaults, 2025-03-28, v4.1.0-rc1~384^2~3) to avoid updating
explicitly-specified cache entries on the first run.  Do not reset the
default value until at least the second run, during which we have
`_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX` already defined.

Fixes: #27211
2025-09-10 16:03:43 -04:00
Nils Gladitz
193f17102f CPack/WiX: Implement opt-in per component .cab
By setting CPACK_WIX_CAB_PER_COMPONENT users can generate one
.cab per component instead of one .cab per installer.

WiX compresses .cab files in parallel.
This may potentially speed up installer creation.

May also allow larger installers (there is a 2GB per .cab limit).
2025-09-10 12:24:42 +02:00
Brad King
563e11b6fd Merge topic 'cmake#27203/add-NDEBUG-GHS'
7493bc6d4a GHS C/CXX compiler: add NDEBUG compile define for non-debug aka release builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11158
2025-09-09 09:53:10 -04:00
Brad King
c81e96d80c Merge topic 'CheckCompilerFlag-no-newlines'
993794f5f6 CheckCompilerFlag: Avoid matching parts of multiple messages
c196e024bd CheckCompilerFlag: Improve layout of message regex tables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11161
2025-09-09 09:48:37 -04:00
Brad King
f32b6ae8f2 Merge topic 'iar-asm'
87d95b2222 ASM: Restore CMAKE_ASM_COMPILER_ARCHITECTURE_ID persistence

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11160
2025-09-09 09:45:34 -04:00
Brad King
76d88f7895 VS: Add CSharp VS 2026 compiler version and flag table v145
While the flag tables for C and C++ were generated from MSBuild `.xml`
files, the CSharp flag tables were written by hand.  Copy the `v143`
flag table to use for the `v145` toolset.
2025-09-08 20:24:14 -04:00
Andreas Graf
7493bc6d4a GHS C/CXX compiler: add NDEBUG compile define for non-debug aka release builds
Fixes: #27203
2025-09-08 18:19:03 +02:00
Brad King
bf1841534c Merge topic 'cpack-several-checksums'
bc1c295b95 CPack: Add support for multiple checksums per package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11141
2025-09-08 11:29:34 -04:00
Brad King
daf5cc56a0 Merge topic 'fbuild_clang_cl'
888e9e1081 FASTBuild: fix CMake build with clang-cl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11137
2025-09-08 11:25:51 -04:00
Brad King
5e34b752d6 Merge topic 'cmp0178-warning-googletest'
f4059c5923 GoogleTest: Prevent spurious CMP0178 warning for EXTRA_ARGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11152
2025-09-08 11:23:58 -04:00
Brad King
e6c24fe936 Merge topic 'cmp0174-warning-fetchcontent'
20c751bdcb FetchContent: Update policy settings to CMake 4.1
60b8114ea9 Help: Stronger wording for prohibited keywords in FetchContent_Declare()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11151
2025-09-08 11:22:07 -04:00
Brad King
993794f5f6 CheckCompilerFlag: Avoid matching parts of multiple messages
Diagnostic messages for unsupported flags appear on a single line.
Do not accidentally match unrelated messages across multiple lines.

Fixes: #27156
2025-09-08 11:16:09 -04:00
Brad King
c196e024bd CheckCompilerFlag: Improve layout of message regex tables 2025-09-08 11:14:41 -04:00
Brad King
87d95b2222 ASM: Restore CMAKE_ASM_COMPILER_ARCHITECTURE_ID persistence
Refactoring in commit 019f0f8b32 (ARCHITECTURE_ID: Save persistently
even if empty, 2025-03-13, v4.1.0-rc1~499^2~1) accidentally dropped
part of the variable name in `CMakeASMCompiler.cmake`.

Reported-by: Felipe Torrezan <felipe.torrezan@iar.com>
2025-09-08 10:38:30 -04:00
Brad King
59d08d013b Merge topic 'mold-depfile-support'
3a7eed6a27 mold linker: support discovery of --dependency-file support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11142
2025-09-05 09:14:07 -04:00
Brad King
9af1de9409 Merge topic 'FindPython-ABI-handling'
c504b1c638 FindPython: Ensure correct handling of Python_FIND_ABI variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11145
2025-09-05 09:05:00 -04:00
Sergiu Deitsch
bc1c295b95 CPack: Add support for multiple checksums per package
Closes: #27174
2025-09-05 08:42:17 -04:00
Craig Scott
f4059c5923 GoogleTest: Prevent spurious CMP0178 warning for EXTRA_ARGS
Fixes: #27190
2025-09-05 16:54:57 +10:00
Craig Scott
20c751bdcb FetchContent: Update policy settings to CMake 4.1
The warning for policy CMP0174 can be triggered if a project mistakenly
specifies CONFIGURE_COMMAND, BUILD_COMMAND, INSTALL_COMMAND,
or TEST_COMMAND as keywords to FetchContent_Declare() and it passes
an empty string after the keyword. It shouldn't be specifying any of those
keywords, but doing so has always worked because FetchContent_Declare()
explicitly discards them. However, when a project specifies them, they get
used internally in contexts where the policy settings are those of the
FetchContent module itself. Those settings haven't been updated past
CMake 3.29, and CMP0174 came in with CMake 3.31.

Update the policy settings for FetchContent to avoid triggering the CMP0174
warning when a project erroneously specifies the prohibited keywords.

Fixes: #27157
2025-09-05 15:26:05 +10:00
Craig Scott
60b8114ea9 Help: Stronger wording for prohibited keywords in FetchContent_Declare()
Issue: #27157
2025-09-05 15:26:04 +10:00
Eduard Voronkin
888e9e1081 FASTBuild: fix CMake build with clang-cl
Fixes: #27175
2025-09-04 22:12:37 -07:00
Marc Chevrier
c504b1c638 FindPython: Ensure correct handling of Python_FIND_ABI variable
Fixes: #27192
2025-09-04 15:06:57 +02:00
John Drouhard
3a7eed6a27 mold linker: support discovery of --dependency-file support 2025-09-03 17:05:19 -05:00
Brad King
f70a8f890b Merge topic 'aix-clang-compiler-target'
c482a8833a AIX: Fix shared library linking with CMAKE_<LANG>_COMPILER_TARGET

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11113
2025-09-02 10:54:21 -04:00
Brad King
c36c19d711 Merge topic 'patch-CheckIncludeFiles-LANGUAGE'
5000f895fd CheckIncludeFiles: Document version 3.11 for LANGUAGE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11123
2025-09-02 09:52:24 -04:00
David Tenty
c482a8833a AIX: Fix shared library linking with CMAKE_<LANG>_COMPILER_TARGET
With Clang, `CMAKE_C_COMPILER_TARGET` adds a `--target=` flag as part of
the `<CMAKE_C_COMPILER>` placeholder, causing the flag to be passed to
our `ExportImportList` script.  Tolerate it.

Fixes: #27167
2025-09-01 14:42:46 -04:00
Brad King
d65cd65df5 Merge topic 'patch-find-modules-versions'
f0b4c19052 FindIcotool: Add Icotool_VERSION
f503c8dad4 FindHSPELL: Add HSPELL_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11098
2025-09-01 14:36:24 -04:00
Brad King
230c5c7d46 Merge topic 'patch-FindOpenCL-version'
870fd818a3 FindOpenCL: Add OpenCL_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11108
2025-09-01 14:31:02 -04:00
Brad King
5cf0f77644 Merge topic 'patch-FindCUDA-CMAKE_CURRENT_LIST_DIR'
bf26270000 FindCUDA: Use CMAKE_CURRENT_LIST_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11119
2025-09-01 14:28:54 -04:00
Brad King
f1912b72a3 Merge topic 'patch-FindQt4-paths'
8083ce3d8a FindQt4: Use CMAKE_CURRENT_LIST_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11118
2025-09-01 14:26:31 -04:00
Brad King
1c83bf44c8 Merge topic 'patch-ExternalData-paths'
a10fa40c85 ExternalData: Use CMAKE_CURRENT_FUNCTION_LIST_{DIR,FILE}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11117
2025-09-01 14:24:25 -04:00
Brad King
0e99a701d5 Merge topic 'patch-CheckPrototypeDefinition-CMAKE_CURRENT_FUNCTION_LIST_DIR'
6cf9ed5f94 CheckPrototypeDefinition: Use CMAKE_CURRENT_FUNCTION_LIST_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11116
2025-09-01 14:21:20 -04:00
Brad King
2887d438de Merge topic 'patch-CheckTypeSize-CMAKE_CURRENT_FUNCTION_LIST_DIR'
d59be2406e CheckTypeSize: Use CMAKE_CURRENT_FUNCTION_LIST_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11115
2025-09-01 14:18:11 -04:00