1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

15632 Commits

Author SHA1 Message Date
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
Brad King
7f3f6d1ec6 Emscripten: Allow overriding -sMAIN_MODULE and -sSIDE_MODULE linker flags
Place the flag early on executable link lines so that projects can
override it, e.g., with `-sMAIN_MODULE=2` or `-sMAIN_MODULE=0` via
`target_link_options`.

The `-sSIDE_MODULE` flag already appears early enough on shared library
link lines.

Issue: #27232
2025-09-17 19:54:40 -04:00
Brad King
526c6ff6d2 Emscripten: Drop -sMAIN_MODULE and -sSIDE_MODULE with emsdk toolchain file
Emscripten provides a combined toolchain file and platform module that
predates CMake upstream support.  It disables support for shared libs.
Fix commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16) to
avoid linking with `-sMAIN_MODULE` or `-sSIDE_MODULE` flags, meant to
support shared libraries, when using the emsdk toolchain file.

Fixes: #27232
2025-09-17 19:53:22 -04:00
Brad King
644ad91e6a Emscripten: Restore support for emsdk toolchain file and platform module
Emscripten provides a combined toolchain file and platform module that
predates CMake upstream support.  Since commit 96d9b94a98 (Emscripten:
Add platform modules, 2025-05-16), our `Platform/Emscripten` module is
included instead, suppressing existing behavior for users that set
`CMAKE_TOOLCHAIN_FILE` to the emsdk-provided toolchain file.  Restore
the previous behavior by teaching our module to defer to the original
module in that case.

Issue: #27232
2025-09-17 19:45:44 -04:00
Brad King
9cbeb922dd Emscripten: Enable de-duplication of libraries for CMP0156 with LLD
LLD automatically resolves newly encountered symbols using object files
previously encountered.  Also, the Emscripten compiler driver invokes
the LLD linker with `--whole-archive ... --no-whole-archive` around all
the libraries.  Therefore we should not repeat any.

Issue: #27232
Suggested-by: Marc Chevrier <marc.chevrier@gmail.com>
2025-09-17 19:44:13 -04:00
Brad King
f22d2904e2 Emscripten: Drop unused placeholder from link rule variables
Update commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16)
to account for commit 67639002ad (Ninja,Makefile: Drop now-unused
placeholders from link rule variables, 2025-06-09, v4.1.0-rc1~37^2~1).
2025-09-17 19:44:13 -04:00
Brad King
f4da11a5da Emscripten: Select emcc and em++ compilers by default
This was missed by commit 96d9b94a98 (Emscripten: Add platform modules,
2025-05-16).
2025-09-17 19:44:13 -04:00
Brad King
9266d4817d Android: Allow custom compilers with NDK
If the user or toolchain file has already set `CMAKE_{C,CXX}_COMPILER`,
do not override it with the NDK-provided toolchain.

Fixes: #27162
2025-09-17 10:44:47 -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
Peter Kokot
6a0cf35429 FindQt3, FindQt4: Clarify QT_FOUND result variable
Both of these modules provide `QT_FOUND` variable when using the
deprecated FindQt module, but `<PackageName>_FOUND` should be used when
using `find_package(Qt3)` or `find_package(Qt4)`.

- Qt3_FOUND became available in CMake 3.3.
2025-09-16 23:10:44 +02:00
Brad King
690ed2f706 Merge topic 'patch-CMakeConfigurableFile'
92c808687d Modules: Use file(CONFIGURE) instead of CMakeConfigurableFile.in

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11188
2025-09-16 09:55:23 -04:00
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