Commit Graph

72079 Commits

Author SHA1 Message Date
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 28bab611c6 Tests: Add RunCMake.Emscripten case for a shared library 2025-09-17 19:43:36 -04:00
Brad King d3e9c7bf8a Tests: Clarify RunCMake.Emscripten case names 2025-09-17 19:41:16 -04:00
Brad King a3ccb05430 Merge topic 'vs-ifx'
eae0a053f5 VS: Default Intel Fortran projects to ifx in VS 18 and above

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11197
2025-09-17 10:11:38 -04:00
Brad King 508cabc812 Merge topic 'cps-import-interface'
e23f0748d8 CPS: Import per-configuration attributes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11140
2025-09-17 10:09:06 -04:00
Brad King 1b77de4c1b Merge topic 'instrumentation-postbuild-error'
e5db41147a Tests/instrumentation: Improve error message when postBuild check fails

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11195
2025-09-17 10:07:21 -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
Kitware Robot 5536171cf3 CMake Nightly Date Stamp 2025-09-17 00:05:18 -04:00
Brad King eae0a053f5 VS: Default Intel Fortran projects to ifx in VS 18 and above
Intel oneAPI distributions no longer include the `ifort` compiler, but
its Visual Studio Integration defaults to `ifort` if `ifx` is not
explicitly specified in the `.vfproj` file.  We cannot change the
default Fortran compiler in VS 17 and older, but since the VS 18
generator is new, we can establish `ifx` as its default.  This
establishes working defaults on new versions of VS and oneAPI while
retaining existing behavior on older versions.

Issue: #26415
2025-09-16 14:35:33 -04:00
Taylor Sasser e23f0748d8 CPS: Import per-configuration attributes 2025-09-16 10:39:24 -04:00
Brad King 5e206e15c5 Merge topic 'fbuild_reduce_aliases'
4387c965a6 FASTBuild: optimize generated file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11193
2025-09-16 09:56:55 -04: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 592297dbea Merge topic 'fix_typo_in_tests'
899172109a Tests: Fix RunCMake.CMakePresetsBuild failure message order

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11181
2025-09-16 09:48:44 -04:00
Martin Duffy e5db41147a Tests/instrumentation: Improve error message when postBuild check fails 2025-09-16 09:45:37 -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 4251e9381d Merge branch 'release-4.1' 2025-09-16 08:50:44 -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
Brad King 3b95dadd08 Merge topic 'lfortran-0.55' into release-4.1
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:40 -04:00
Kitware Robot 7043a42757 CMake Nightly Date Stamp 2025-09-16 00:05:23 -04:00
Brad King 3b85cc1a8e Tests: Extend RunCMake.ParseImplicitLinkInfo for LFortran 0.55.0 2025-09-15 20:34:16 -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
Eduard Voronkin 899172109a Tests: Fix RunCMake.CMakePresetsBuild failure message order
The actual and expected content were switched.
2025-09-15 17:05:20 -04:00
Brad King 9a53a28596 Merge topic 'improve-diagnostic'
ca072e3734 cmListFileLexer: Test for broken UTF-32-(BE|LE) BOM
3b8ddf3f45 cmListFileLexer: Handle null character in the grammar
7040406f86 cmListFileLexer: Do not require null-terminated input
0a26c08004 cm/string_view: Prevent find access past string end
63328f01f8 Utilities/Scripts: Drop CommandArgument lexer/parser generation step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11173
2025-09-15 11:42:12 -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 0355497103 Merge topic 'intermediate-dir-strategy-mark-usage'
9ad31a0d88 cmGlobalGenerator: mark intermediate directory strategy variables as used

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11178
2025-09-15 11:37:47 -04:00
Brad King 47c784ba8a Help: Add release note for Visual Studio 18 2026 generator 2025-09-15 11:34:07 -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
Kitware Robot d148703375 CMake Nightly Date Stamp 2025-09-15 00:05:31 -04:00
Eduard Voronkin 4387c965a6 FASTBuild: optimize generated file
List of changes:
1. Remove unneeded aliases
2. Don't write VS Solution on Apple
3. Use external script to perform clean
4. Fix small bug when empty environment was
resulting in invalid file.
It greatly reduces the size of .fdb file and
makes FASTBuild run much faster in different cases.
2025-09-14 20:26:11 -07:00
Craig Scott 0f0b9dde66 Merge topic 'patch-ExternalProject-include'
395452ad1d ExternalProject: Document module inclusion in project mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11177
2025-09-14 22:57:46 -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
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
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
Kitware Robot dd06fad849 CMake Nightly Date Stamp 2025-09-14 00:05:12 -04:00
Peter Kokot 92c808687d Modules: Use file(CONFIGURE) instead of CMakeConfigurableFile.in
When this was implemented, file(CONFIGURE) wasn't yet available until
CMake 3.18.
2025-09-14 00:56:19 +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
Kitware Robot b53375ea94 CMake Nightly Date Stamp 2025-09-13 00:05:12 -04:00
Ben Boeckel 9ad31a0d88 cmGlobalGenerator: mark intermediate directory strategy variables as used
Fixes: #27222
2025-09-12 13:59:22 -04:00