In commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16,
v4.2.0-rc1~607^2~3) this flag was added as part of an attempt to support
shared libraries without requiring projects to set much themselves. That
attempt was reverted by commit d361bf365e (Emscripten: Drop hard-coded
-sMAIN_MODULE and -sSIDE_MODULE flags, 2025-09-18, v4.2.0-rc1~146^2).
Also avoid hard-coding `-fPIC`. `POSITION_INDEPENDENT_CODE` is already
enabled for shared library targets. Projects can enable it themselves
where `-fPIC` is needed outside of shared libraries.
Fixes: #27424
Issue: #27240
Since commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16,
v4.2.0-rc1~607^2~3), compilation command-lines for Emscripten place
`-c <SOURCE>` before all the flags. Restore the original order.
Fixes: #27404
In flang, both -J and -module-dir support both joined and separate values. For
the -J option, these are of the form `-J<value>` and `-J <value>` respectively.
Once https://github.com/llvm/llvm-project/pull/168748 is committed, -module-dir
will only work with a separate value. Setting CMAKE_Fortran_MODDIR_FLAG to -J
ensures that both joined and separate styles will continue to work after that
change is made. As far as behavior is concerned, both -J and -module-dir are
aliases.
Extend commit e301cbffcc (ExternalProject: Set environment variables,
2025-04-09, v4.2.0-rc1~480^2) and commit 9cb590b843 (ExternalProject:
Fix lists and empty commands with environment modification, 2025-09-11,
v4.2.0-rc1~9^2) to match `_` in environment modification operation
names.
Fixes: #27409
Extend commit e78abf94e3 (VS/Android: Use ApplicationTypeRevision 3.0 in
VS2022, 2023-04-21, v3.27.0-rc1~165^2~4) to cover VS 2026 too. This was
missed in commit 3392b371e2 (VS: Add Visual Studio 18 2026 generator,
2025-08-20, v4.2.0-rc1~165^2~1).
Adds a parser and serializer for the EcoStd Module Metadata format
RFC: https://github.com/ecostd/rfcs/pull/3
This adapts the existing experimental support for import std; to use
the new parser. The CMAKE_CXX_STDLIB_MODULES_JSON is now the canonical
variable for controlling how CMake discovers the stdlib module metadata,
and is used directly by compiler detection.
Toolchains can still override the __CMAKE::CXX## targets if they wish,
either in conjunction with CMAKE_CXX_STDLIB_MODULE_JSON or not. It is
possible to disable automatic detection of
CMAKE_CXX_STDLIB_MODULE_JSON by setting it to the empty string.
When available, the CMAKE_CXX_STDLIB_MODULE_JSON will be used to create
all requested C++ stdlibs which do not already have targets.
When setting the installation prefix at the installation phase
(`cmake --install`) using the `--prefix` option, the GNU special cases
aren't applicable. This also adds a small clarification when to use the
`--prefix` option at the installation phase.
Briefly mentioned also the CMake presets installDir field,
the CPACK_PACKAGING_INSTALL_PREFIX variable, and the $<INSTALL_PREFIX>
generator expression so user has a better overview.
Fixes#27343Fixes#26338
Add `CPACK_ARCHIVE_UID` and `CPACK_ARCHIVE_GID` options.
Add a policy to change the default to 0/0 to enable ownership
by root if unpacking as root.
Fixes: #12901
Fix commit 6680df042e (GoogleTest: Avoid POST_BUILD race condition for
gtest_discover_tests(), 2025-10-26, v4.2.0-rc2~15^2) to actually hash
the target name instead of an empty string.
Fixes: #27319
6a35c277d0 FindPython: Support getting DEBUG_POSTFIX without requiring Interpreter
43fec72adb Tests: Fix RunCMake.UseSWIG SetPOSTFIX case on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11345
6a35c277d0 FindPython: Support getting DEBUG_POSTFIX without requiring Interpreter
43fec72adb Tests: Fix RunCMake.UseSWIG SetPOSTFIX case on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11345
If multiple calls to `gtest_discover_tests()` are made with different
targets and they use the same working directory, they would previously
have tried to use the same `cmake_test_discovery.json` file for collecting
the set of tests during discovery. Incorporate a hash of the target name
into the file name to ensure that no longer occurs.
Fixes: #27319
Xcode by default targets the SDK's macOS version rather than the host's
macOS version. In commit 7b19531291 (macOS: Do not pass any
SDK/-isysroot to compilers by default, 2024-11-06, v4.0.0-rc1~511^2) we
reverted commit 24aafbde11 (Xcode: Adjust deployment target SDK version
to host version, 2015-10-11, v3.4.0-rc2~6^2), but it is still needed for
Xcode. Restore the behavior so binaries run on the host by default.
Fixes: #27309
In fc7aa3cd69 (tests: Preserve empty arguments in test command lines,
2024-09-30), the CMP0174 policy setting had to be explicitly handled in
GoogleTestAddTests.cmake because it was part of the same release.
Now that we're past that release, we can remove that and update the
policies based on the CMake version instead. This removes the TODO
added in that original commit.
We also update the policy settings in GoogleTest.cmake so that we are
using consistent policy settings across the GoogleTest implementation.
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11350
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11350