Commit Graph

3064 Commits

Author SHA1 Message Date
Javier Martín
343ee5b9ee UseJava: add INCLUDE_MODULES argument to add_jar
Arguments are added to the dependencies list, and to the "--module-path"
passed to javac, which is only generated for adequate JDK versions.
2025-10-14 18:23:21 +02:00
Brad King
3cf002e2db Begin post-4.2 development 2025-10-09 10:27:29 -04:00
Brad King
79bc6f6b60 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2025-10-09 10:20:36 -04:00
Brad King
ec28123cb4 Help: Consolidate 4.2 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/4.2.rst`.
2025-10-09 09:36:44 -04:00
Martin Duffy
f195c9ef2a genex: Add TARGET_INTERMEDIATE_DIR expression
Fixes: #27196
2025-10-09 08:07:20 -04:00
Craig Scott
f38f325e08 fileAPI: Add direct dependencies to target codemodel files
This adds the following new arrays, which together capture all direct
dependencies and interface dependencies of a target:

- linkLibraries
- interfaceLinkLibraries
- compileDependencies
- interfaceCompileDependencies
- objectDependencies
- orderDependencies

Fixes: #21995, #25213
2025-10-07 10:44:28 -04:00
AJIOB
6874efb592 MSVC: Always define a character set
When targeting the MSVC ABI, define `_MBCS` by default if the project
does not define `_SBCS` or `_UNICODE`.  Visual Studio has long defined
one of the three character set macros automatically.  For consistency,
define it when compiling for the MSVC ABI with other generators.
Add policy CMP0204 for compatibility.

Fixes: #27275
2025-10-07 09:29:32 -04:00
Brad King
7aa81ae324 Help: Simplify release notes for find module version variables
Avoid repeating almost identical information for every module.
Document the pattern of the change and refer the reader to individual
modules for details.
2025-10-01 09:23:33 -04:00
Brad King
f98b4eecf6 Help: Document generators supporting CMAKE_INTERMEDIATE_DIR_STRATEGY
Move this information from the release note to the actual docs.
2025-10-01 09:23:32 -04:00
AJIOB
83bbde5449 MSVC: Define _WINDLL consistently for shared libraries
Visual Studio defines this automatically for `.dll` targets.
For consistency, define it when compiling for the MSVC ABI
with other generators.  Add policy CMP0203 for compatibility.

Fixes: #27253
2025-09-29 18:26:44 -04:00
Brad King
e49de5d5d6 Merge topic 'fileapi-interface-and-imported-targets'
b626843d71 fileAPI: Output all INTERFACE and IMPORTED targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11232
2025-09-29 09:21:45 -04:00
Brad King
441b1ebe75 Merge topic 'patch-found-variables'
0fedf1592c Find*: Update *_FOUND variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11220
2025-09-26 09:58:27 -04:00
Brad King
6e1de32c9d Merge topic 'pdb-postfix'
7a154bf4fd GenEx: Add POSTFIX option to $<TARGET_PDB_FILE_BASE_NAME>
5654207925 PDB: Always add the target per-config POSTFIX to .pdb names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11235
2025-09-26 09:26:49 -04:00
Craig Scott
b626843d71 fileAPI: Output all INTERFACE and IMPORTED targets
Fixes: #27248
2025-09-26 22:01:45 +10:00
Brad King
a0f4d45c52 Merge topic 'cpack-nsis-crc-check'
3c7fee0d99 CPack/NSIS: Allow setting CRCCheck

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11242
2025-09-25 09:15:12 -04:00
Brad King
84b0265f86 Merge topic 'patch-docs-4.2-release-notes'
70f3a81769 Help: Add release note for ExternalProject's environment modification options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11238
2025-09-25 09:11:17 -04:00
Brad King
3e9f777c37 Merge topic 'patch-CheckTypeSize-RESULT_VARIABLE'
1b9812f701 CheckTypeSize: Add check_type_size(RESULT_VARIABLE)
9a3ad6f663 CheckTypeSize: Move tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11185
2025-09-25 09:08:37 -04:00
Marc Chevrier
7a154bf4fd GenEx: Add POSTFIX option to $<TARGET_PDB_FILE_BASE_NAME>
Extend commit 0b055a8893 (GenEx: add POSTFIX option to
$<TARGET_FILE_BASE_NAME>, 2025-09-07) to cover PDB names too.
2025-09-25 11:02:44 +02:00
Daniel Pfeifer
3c7fee0d99 CPack/NSIS: Allow setting CRCCheck
Fixes: #27260
2025-09-24 19:30:27 +02:00
Peter Kokot
70f3a81769 Help: Add release note for ExternalProject's environment modification options
This was left out of commit e301cbffcc (ExternalProject: Set environment
variables, 2025-04-09).
2025-09-24 09:02:43 -04:00
Brad King
60cdc353c1 Merge topic 'feat/cmake_language_TRACE'
cb07358256 cmake_language: add `TRACE` subcommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11229
2025-09-24 08:59:50 -04:00
Peter Kokot
1b9812f701 CheckTypeSize: Add check_type_size(RESULT_VARIABLE)
Changes:
- Added new `RESULT_VARIABLE` keyword to enable customizing the name of
  the internal cache variable, which contains the boolean result of the
  check.
- The macro check_type_size() changed to function for easier arguments
  handling.
- Documentation synced and extended to better understand the
  check_type_size() command. Some typos fixed in the initial example.
- CheckTypeSize tests adjusted so also C++ is tested.
- Error messages slightly adjusted when checking the LANGUAGE argument.

Closes: #27202
2025-09-24 00:14:19 +02:00
Peter Kokot
0fedf1592c Find*: Update *_FOUND variables
This marks all `<PACKAGENAME>_FOUND` result variables as deprecated
where possible (for `<PackageName>` find modules) to make it clearer
which variable to use.

In CMake 3.3, the FindPackageHandleStandardArgs module was refactored to
set both `<PackageName>_FOUND` and uppercase `<PACKAGENAME>_FOUND`
result variables to the same values. Before that, the FOUND_VAR argument
could be used to set the result variable.

* FindMatlab: Uppercased MATLAB_FOUND is not mentioned as it was never
  documented.
* Documentation for FindPythonInterp and FindPythonLibs modules synced
  accordingly to their deprecation (3.12 instead of 4.2).
* OPENGL_FOUND: deprecation version synced with other find modules.
* DevIL_FOUND was introduced in CMake 3.8. The uppercased variant not
  mentioned as it was previously never documented.

Fixes: #27242
2025-09-23 21:40:58 +02:00
Marc Chevrier
2d4f3d6a6d UseSWIG: Add POSTFIX management
Fixes: #27185
2025-09-23 16:01:59 +02:00
Alex Turbov
cb07358256 cmake_language: add TRACE subcommand
Closes 27235.
2025-09-23 03:02:03 +04:00
Marc Chevrier
0b055a8893 GenEx: add POSTFIX option to $<TARGET_FILE_BASE_NAME>
Fixes: #27189
2025-09-23 00:19:53 +02:00
Timo Röhling
d94d79a909 string: Add REGEX QUOTE sub-command
Add a command to generate a regular expression that matches an
input string literally by escaping special characters.

Fixes: #18580
2025-09-18 13:25:20 -04:00
Brad King
b62e751369 Merge topic 'patch-FindGit-version'
fe72a5dba2 FindGit: Add Git_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11191
2025-09-17 10:04:31 -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
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
47c784ba8a Help: Add release note for Visual Studio 18 2026 generator 2025-09-15 11:34:07 -04:00
Peter Kokot
fe72a5dba2 FindGit: Add Git_VERSION
This deprecates the GIT_VERSION_STRING result variable.

Issue: #27088
Fixes: #26868
2025-09-14 21:08:16 +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
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
568e3318bc Merge topic 'wix-multi-cab'
193f17102f CPack/WiX: Implement opt-in per component .cab

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11166
2025-09-11 12:04:27 -04:00
Brad King
042b88e3f4 Merge topic 'object-name-properties'
b53837a1bd prop_sf/INSTALL_OBJECT_NAME: support custom install object names
08f1a0fbc6 cmLocalGenerator: get the configuration when building object paths
168e55be41 cmObjectLocation: support install-specific object locations
84372ce0b5 prop_sf/OBJECT_NAME: no-op for the FASTBuild and Xcode generators
9ef99353cb prop_sf/OBJECT_NAME: support custom object names
7aff0d37b5 cmSourceFile: add accessors for PCH source files
bbdc2fd908 cmSourceFile: internally track CMake-managed source files
388923818d cmGeneratorTarget: return the source file added
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11144
2025-09-10 10:01:47 -04:00
Brad King
e0a9bbfc23 Merge topic 'target-SKIP_LINTING'
f100769d72 Add `SKIP_LINTING` target property and `CMAKE_SKIP_LINTING` variable
0d6b5d54b2 Tests/RunCMake/MultiLint: Extract test preparation code into separate file
3a21092d75 Tests/RunCMake/MultiLint: Refactor test runs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11139
2025-09-10 09:53:48 -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
Ben Boeckel
b53837a1bd prop_sf/INSTALL_OBJECT_NAME: support custom install object names
These can support configuration-dependent queries much more easily, so
separate it out.
2025-09-09 09:58:07 -04:00
Ben Boeckel
9ef99353cb prop_sf/OBJECT_NAME: support custom object names
Projects which ship object files as artifacts may want to control the
object names as much as possible. Support setting explicit object names
as source file properties to support such use cases.
2025-09-09 09:58:07 -04:00
Alex Turbov
f100769d72 Add SKIP_LINTING target property and CMAKE_SKIP_LINTING variable
These offer target-wide settings to disable lints.

Closes: #27191
2025-09-09 09:56:35 -04:00
Brad King
a3a3416bc1 Merge topic 'install-object-only-destination'
c1de3c72a3 install: support using `DESTINATION` as-is for object installation
cf44806e7c Help/CMAKE_INSTALL_OBJECT_NAME_STRATEGY: add `versionadded` directive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11138
2025-09-08 11:32:05 -04: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
Ben Boeckel
c1de3c72a3 install: support using DESTINATION as-is for object installation
CMake historically has forced an `objects[-<CONFIG>]/<TARGET_NAME>`
subdirectory under an `OBJECT` library installation's `OBJECTS
DESTINATION` which may be unwanted. Support skipping this component
with a target property.
2025-09-06 00:44:42 -04:00
Sergiu Deitsch
bc1c295b95 CPack: Add support for multiple checksums per package
Closes: #27174
2025-09-05 08:42:17 -04:00
Stephen Kennedy
5723e65215 Unity: Add a target property to control generated filenames
If not set default to `unity_` as before.

Closes: #26927
2025-09-04 09:31:01 -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
985bbf724a Merge topic 'fbuild'
94113ac687 ci: Add jobs for FASTBuild generator on Linux, macOS, and Windows
01147454e7 FASTBuild: Add generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Osyotr <zhenchik35026@gmail.com>
Acked-by: Peter Kokot <peterkokot@gmail.com>
Merge-request: !10941
2025-08-27 11:43:37 -04:00
Brad King
2981a064f4 Merge topic 'patch-FindwxWidgets-wxWidgets_USE_FILE'
4f9a8c8aa1 FindwxWidgets: Deprecate wxWidgets_USE_FILE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11110
2025-08-27 11:36:21 -04:00