Commit Graph

15648 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
Javier Martín
b3365e7c57 UseJava: extract function to prepare the classpath arguments in add_jar 2025-10-14 18:10:54 +02:00
Brad King
3031e3015e Merge topic 'patch-FindMatlab'
1d57678146 FindMatlab: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11308
2025-10-14 11:50:56 -04:00
Brad King
44edd3df3f Merge topic 'patch-CPackIFWConfigureFile'
559bfd0bbd CPackIFWConfigureFile: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11305
2025-10-14 11:49:11 -04:00
Brad King
3bf400558d Merge topic 'patch-find-modules-missing-found-vars'
c8ea0ba3be Find*: Add missing <PackageName>_FOUND variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11303
2025-10-14 11:47:48 -04:00
Brad King
5e7fa8d624 Merge topic 'patch-FindLua-version-51'
b4a08078d6 FindLua51: Use Lua51_VERSION result variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11306
2025-10-14 11:46:27 -04:00
Brad King
52cf9fc48f Merge topic 'patch-FindOpenMP'
e5aa17333d FindOpenMP: Set the version result variable and update docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11304
2025-10-14 11:44:42 -04:00
Brad King
32ee984b60 Merge topic 'find_cuda_toolkit_run_nvcc_with_ccbin'
4c3480fc0a CUDAToolkit: Use correct target paths from nvcc when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11228
2025-10-14 11:43:28 -04:00
Brad King
623e1b6c62 Merge topic 'external-project-env-mod-lists'
9cb590b843 ExternalProject: Fix lists and empty commands with environment modification
2e0a8455b3 Tests: Match expected environment modification more completely
819c6177b8 Tests: Match expected environment modification more consistently
c555e10fd4 Tests: Use shorter paths in RunCMake.ExternalProject

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11272
2025-10-14 11:40:40 -04:00
Peter Kokot
559bfd0bbd CPackIFWConfigureFile: Update documentation
- Extended command description.
- Added basic "Examples" section.
- Added "See Also" section.
2025-10-13 12:12:45 -04:00
Peter Kokot
b4a08078d6 FindLua51: Use Lua51_VERSION result variable
If using both FindLua and FindLua51 modules, the FindLua51 and Lua 5.2
or newer is found, FindLua51 module can set the Lua_VERSION variable to
empty value. Instead, the Lua51_VERSION can be used to bypass this
issue.

Issue: #27088
2025-10-13 12:10:24 -04:00
Peter Kokot
e5aa17333d FindOpenMP: Set the version result variable and update docs
* This module previously didn't define the OpenMP_VERSION result
  variable.
* Added CMake versions to variables when they were provided by the
  module.
* Synced docs.
2025-10-13 12:09:54 -04:00
Peter Kokot
c8ea0ba3be Find*: Add missing <PackageName>_FOUND variables
* FindKDE4: Added note about KDE4_FOUND result variable (it is set by
  the upstream FindKDE4Internal module, and now also synced in the docs
  and code for consistency).

For the sake of completeness with other find modules, also the following
deprecated find modules are synced as they already provided these
variables:

* FindDart: Documented the Dart_FOUND result variable.
* FindUnixCommands: Updated documentation (documented UnixCommands_FOUND
  result variable, and listed cache variables used by this module).

Issue: #27242
2025-10-13 12:06:58 -04:00
Peter Kokot
1d57678146 FindMatlab: Update documentation
- Moved all documentation to the top header comment to make it easier to
  manage and adjust.
- Synced module documentation with other similar find modules.
- Restructured the module docs and titles.
- Added missing "versionadded" RST directives.
- Used "command" instead of "function".
- Added examples section.
- Removed redundant variable references.
2025-10-13 17:54:16 +02:00
Robert Maynard
4c3480fc0a CUDAToolkit: Use correct target paths from nvcc when cross-compiling
This fixes issues where FindCUDAToolkit would find host
host platform libraries when nvcc -ccbin pointed to compiler of
a different CPU architecture.
2025-10-13 11:04:10 -04:00
Evan Wilde
9cb590b843 ExternalProject: Fix lists and empty commands with environment modification
Fix two bugs from commit e301cbffcc (ExternalProject: Set environment
variables, 2025-04-09):

* Do not flatten lists in command arguments when adding env mods.

* Remove empty `COMMAND`s without injecting corresponding env mods.

Fixes: #27125
Fixes: #27126
Co-authored-by: Brad King <brad.king@kitware.com>
2025-10-13 10:28:17 -04:00
Dylan Ulis
765e420128 QCC: Remove "-Wp," prefix for qcc system include arguments
`-Wp` is not needed on modern QNX/QCC.
`-isystem` is supported directly since QNX 7.0

Fixes: #26912
2025-10-09 09:51:29 -04:00
Brad King
051b0efd7d Merge topic 'FindZLIB-static'
b2c059e68f FindZLIB: Find static libraries from upstream zlib's cmake-based build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11291
2025-10-08 09:36:08 -04:00
Brad King
af8180a5a9 Merge topic 'ticlang-c17'
3a34f7715e TIClang: Add flags for C17 standard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11285
2025-10-08 09:34:43 -04:00
winapiadmin
b2c059e68f FindZLIB: Find static libraries from upstream zlib's cmake-based build
Upstream zlib commit `74247f0947` (CMake: Install libs with static and
debug suffix., 2024-11-30) added suffix `s` to static library names.
2025-10-07 13:38:24 -04:00
Daniel Körner
3a34f7715e TIClang: Add flags for C17 standard
C17 is supported since version 1.3.
2025-10-07 11:11:52 -04:00
Robert Maynard
a345c0e193 FindCUDAToolkit: Don't keep searching when CUDAToolkit_ROOT is set
Don't continue to search other locations for CUDA if the user
has specified a location and we fail to find it.
2025-10-06 11:17:16 -04:00
Peter Kokot
fdadbe42fe FindCxxTest: Add CxxTest_FOUND variable and update docs
- This module previously didn't define the CxxTest_FOUND result variable
  consistently if neither Python nor Perl were found.
- Documentation is also updated a bit further to note that Perl-based
  test generator script has been removed in CxxTest version 4.0.
- Internal comments synced.
- Python_FOUND result variable used.

Issue: #27242
2025-10-02 22:31:41 +02:00
Brad King
0e0a304f41 Merge topic 'patch-FindOpenAL-version'
4df39cf269 FindOpenAL: Remove OPENAL_VERSION_STRING
ea2b9c6c01 FindOpenAL: Re-order deprecated variables section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11273
2025-10-02 13:53:53 -04:00
Peter Kokot
4df39cf269 FindOpenAL: Remove OPENAL_VERSION_STRING
This result variable wasn't set by this module, yet it was documented.

Issue: #27088
2025-10-01 19:39:27 +02:00
Peter Kokot
ea2b9c6c01 FindOpenAL: Re-order deprecated variables section 2025-10-01 19:38:32 +02: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
c3b65c19ba Merge topic 'gtest-discover-tests-cleanup'
d86da0af70 GoogleTest: cleanup file generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11254
2025-09-29 09:24:43 -04:00
Daniel Pfeifer
d86da0af70 GoogleTest: cleanup file generation
For single config generators, don't write a file at configure time
as it will be rewritten at generation time.

For multi config generators, use `$<CONFIG>` in the output instead
of looping over `CMAKE_CONFIGURATION_TYPES`.
2025-09-26 16:03:30 +02: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
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
0c51c19553 Merge topic 'patch-rst-typos'
ee25bc5434 Help: Fix typos in versionadded directives

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11237
2025-09-25 09:12:55 -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
Daniel Pfeifer
3c7fee0d99 CPack/NSIS: Allow setting CRCCheck
Fixes: #27260
2025-09-24 19:30:27 +02: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
Peter Kokot
ee25bc5434 Help: Fix typos in versionadded directives 2025-09-23 20:53:21 +02:00
Marc Chevrier
2d4f3d6a6d UseSWIG: Add POSTFIX management
Fixes: #27185
2025-09-23 16:01:59 +02:00
Brad King
15537956ab Merge topic 'FindPython-AIX'
2656c5c017 FindPython: AIX: explicit link to python library is required

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !11223
2025-09-23 08:53:05 -04:00
Brad King
2913f8b2ed Merge topic 'find_cuda_toolkit_move_more_logic_into_functions'
f757721ecd CUDAToolkit: Refactor find failure error messages to a single macro
0ae76a89b1 CUDAToolkit: Refactor guessing toolkit logic into a function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11207
2025-09-21 18:32:11 -04:00
Brad King
7082fd0a20 Merge topic 'refactor_find_cuda_toolkit_to_support_cross_compilation_linux'
aed29e04bc CUDAToolkit: Prefer CUDAToolkit_ROOT over users `PATH` path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11200
2025-09-21 18:29:44 -04:00
Marc Chevrier
2656c5c017 FindPython: AIX: explicit link to python library is required
Fixes: #27200
2025-09-21 14:39:42 +02:00
Robert Maynard
f757721ecd CUDAToolkit: Refactor find failure error messages to a single macro 2025-09-19 11:36:20 -04:00
Brad King
d361bf365e Emscripten: Drop hard-coded -sMAIN_MODULE and -sSIDE_MODULE flags
These flags are only needed for builds involving shared libraries,
and can cause undesirable behavior when they are not needed.
They also have variants with values like `=2`.  For now, just require
projects to add the flags when needed so they have full control.
In the future we may be able to add an abstraction to control them,
and automatically enable them when linking to shared libraries
or creating them.

Fixes: #27232
Issue: #27240
2025-09-19 09:54:02 -04:00
Brad King
707f14d434 Emscripten: Restore support for indirect use of emsdk toolchain file
Extend commit 644ad91e6a (Emscripten: Restore support for emsdk
toolchain file and platform module, 2025-09-17) to support using a
third-party `CMAKE_TOOLCHAIN_FILE` that includes the emsdk-provided
toolchain file.

Issue: #27232
2025-09-19 09:21:33 -04:00
Robert Maynard
aed29e04bc CUDAToolkit: Prefer CUDAToolkit_ROOT over users PATH path
Fixes #27102
2025-09-18 14:59:53 -04:00
Robert Maynard
0ae76a89b1 CUDAToolkit: Refactor guessing toolkit logic into a function 2025-09-18 14:56:52 -04:00
Brad King
792f6989e9 Merge topic 'android-ndk-custom-toolchain'
9266d4817d Android: Allow custom compilers with NDK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11199
2025-09-18 08:49:55 -04:00
Brad King
0a11a8d77e Merge topic 'patch-QT_FOUND'
6a0cf35429 FindQt3, FindQt4: Clarify QT_FOUND result variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11198
2025-09-18 08:40:34 -04:00
Brad King
f2b2bac85d Emscripten: Detect and identify linker invoked by the compiler driver 2025-09-17 20:03:48 -04:00