Commit Graph

15739 Commits

Author SHA1 Message Date
Brad King
fb82c55f9d Merge topic 'FindRuby-cache-internal'
b4f2c7beab FindRuby: Hide interpreter query cache entries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11500
2025-12-12 10:02:12 -05:00
Brad King
85d359f008 Merge topic 'fix-nvpl'
1bf46814c4 FindBLAS: Make find_package(nvpl) quiet

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11498
2025-12-11 09:42:58 -05:00
Charlie Savage
b4f2c7beab FindRuby: Hide interpreter query cache entries
Avoid exposing them to editing in `cmake-gui` or `ccmake`.
2025-12-11 09:22:06 -05:00
Vito Gamberini
1bf46814c4 FindBLAS: Make find_package(nvpl) quiet
Fixes: #27451
2025-12-10 11:33:12 -05:00
Brad King
485d51f474 Merge topic 'FindRuby-macos-brew'
996a65a328 FindRuby: Add support for Brew on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11474
2025-12-10 09:40:29 -05:00
Charlie Savage
996a65a328 FindRuby: Add support for Brew on macOS
Brew is a common way to install Ruby on MacOS.  Search using paths
provided by the ruby interpreter.
2025-12-09 15:46:22 -05:00
Matthew Woehlke
d4754c1a0c FindSQLite3: Use package name as namespace
As we (hopefully) move toward a CPS world, it is helpful for imported
targets to use the package name as the namespace (as required by CPS).
Modify FindSQLite3 to do so. The old name is retained for compatibility.
2025-12-08 11:14:43 -05:00
Keith Smiley
5f2f36f1ea FindLibXml2: Add a LibXml2_USE_STATIC_LIBS hint
Add an option to search only for the static library.
2025-12-04 15:51:35 -05:00
Brad King
66ef2bce82 Merge topic 'FindPython'
b589a78497 FindPython: Use bracket arguments for python code blocks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11467
2025-12-03 16:27:16 -05:00
Brad King
e4737d1c4a Merge topic 'cli-tar-lzma'
5b87a5d53e cli tar: implement LZMA support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11465
2025-12-03 16:26:20 -05:00
Eisuke Kawashima
b589a78497 FindPython: Use bracket arguments for python code blocks 2025-12-03 01:11:33 +09:00
AJIOB
5b87a5d53e cli tar: implement LZMA support
Fixes: #27433
2025-12-02 10:44:49 +03:00
Eisuke Kawashima
0837fb552f IntelLLVM: Remove unused code
In commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based
compilers, 2020-11-02, v3.20.0-rc1~89^2~20) we added a `set()` that is
immediately followed by another `set()` of the same variable.  Remove
the former.

Fixes: #27019
2025-12-01 16:26:58 -05:00
Brad King
8afe7a3d2d Merge topic 'emscripten-arch-id'
5ec87b2ba7 Emscripten: Provide CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11452
2025-11-26 10:02:26 -05:00
Brad King
4f2ac4f564 Merge topic 'emscripten-fPIC'
86574083a8 Emscripten: Drop hard-coded -fPIC flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sam Clegg <sbc@chromium.org>
Merge-request: !11448
2025-11-26 09:57:42 -05:00
Brad King
2fcbbfcae4 Merge topic 'ExternalProject-env-mod'
8afe5f227c ExternalProject: Fix environment modification ops named with underscores

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11442
2025-11-26 09:45:21 -05:00
Brad King
5ec87b2ba7 Emscripten: Provide CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
Extend commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16,
v4.2.0-rc1~607^2~3) to account for commit 7f0f382c55 (Provide
CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID on more compilers, 2025-03-24,
v4.1.0-rc1~499^2).

Fixes: #27425
2025-11-25 15:46:16 -05:00
Brad King
89d1e92c11 Merge topic 'flang-j-as-moddir'
db6b82ae54 LLVMFlang-Fortran: Use -J instead of -module-dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !11443
2025-11-25 11:13:07 -05:00
Brad King
7dadc53cc3 Merge topic 'flang-j-as-moddir' into release-4.2
db6b82ae54 LLVMFlang-Fortran: Use -J instead of -module-dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !11443
2025-11-25 11:13:05 -05:00
Brad King
d330f70a53 Merge topic 'flang-j-as-moddir' into release-4.1
db6b82ae54 LLVMFlang-Fortran: Use -J instead of -module-dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11443
2025-11-25 11:12:17 -05:00
Brad King
86574083a8 Emscripten: Drop hard-coded -fPIC flag
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
2025-11-25 10:32:04 -05:00
Brad King
aa9d4a6255 Merge topic 'emscripten-platform'
75e98477e3 Emscripten: Restore placement of source files on compile command-lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11444
2025-11-25 10:29:14 -05:00
Brad King
75e98477e3 Emscripten: Restore placement of source files on compile command-lines
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
2025-11-24 14:49:19 -05:00
Tarun Prabhu
db6b82ae54 LLVMFlang-Fortran: Use -J instead of -module-dir
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.
2025-11-24 14:25:21 -05:00
Brad King
8afe5f227c ExternalProject: Fix environment modification ops named with underscores
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
2025-11-24 11:49:30 -05:00
Brad King
aec11718d9 Merge topic 'vs2026-android'
863dc3a7ac VS/Android: Use ApplicationTypeRevision 3.0 in VS2026

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11431
2025-11-21 08:23:10 -05:00
Brad King
863dc3a7ac VS/Android: Use ApplicationTypeRevision 3.0 in VS2026
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).
2025-11-20 14:06:11 -05:00
Vito Gamberini
fa10dc6c22 Experimental/CXXModules: Implement EcoStd Module Metadata parser
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.
2025-11-18 11:39:59 -05:00
Brad King
a5328ab279 Merge topic 'doc-typos-cleanup-4.2'
730cad9cb6 Help: Fix typos and formatting for 4.2 release

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11418
2025-11-14 09:49:18 -05:00
Craig Scott
730cad9cb6 Help: Fix typos and formatting for 4.2 release 2025-11-14 16:29:51 +11:00
Brad King
3653b3e95e Merge branch 'backport-ci-debian-13' into ci-debian-13 2025-11-12 14:44:43 -05:00
Brad King
388e2ae0a5 FindPostgreSQL: Add support for version 17 2025-11-12 14:35:11 -05:00
Brad King
a0642acbce FindImageMagick: Fix detection of version 7 from headers 2025-11-12 14:35:11 -05:00
Brad King
faf8addc71 FindJNI: Add Debian/Ubuntu specific paths for more recent JDK versions 2025-11-12 14:35:11 -05:00
Brad King
64ffd3b323 Merge topic 'findopengl-glvnd-legacy'
32a5f11e50 FindOpenGL: respect legacy preference for OpenGL and GLX libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11385
2025-11-12 11:51:27 -05:00
Quinn Powell
32a5f11e50 FindOpenGL: respect legacy preference for OpenGL and GLX libraries
Fixes: #27299
2025-11-11 14:46:57 -05:00
Peter Kokot
35b1250b0a GNUInstallDirs: Add notice about --prefix option
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 #27343
Fixes #26338
2025-11-10 22:44:12 +01:00
Brad King
f357fc27e5 CPack: Backport "correctly perform querytags on old versions of RPM"
Backport commit 488de6294a (CPack: correctly perform querytags on old
versions of RPM, 2025-01-09, v4.0.0-rc1~182^2~3) to CMake 3.31.
2025-11-10 11:42:44 -05:00
Brad King
1803eda9f7 CPack/RPM: Backport "Fix detection of RPM support for weak dependencies"
Backport commit 283a48403f (CPack/RPM: Fix detection of RPM support for
weak dependencies, 2025-02-28, v4.0.0-rc3~8^2) to CMake 3.31.

Fixes: #27373
2025-11-10 11:40:49 -05:00
Brad King
d2404872b2 CPack/RPM: Backport "Remove redundant conditions for presence of rpmbuild"
Backport commit ab4e74ad0b (CPack/RPM: Remove redundant conditions for
presence of rpmbuild, 2025-02-28, v4.0.0-rc3~8^2~1) to CMake 3.31.
2025-11-10 11:40:20 -05:00
Clinton Stimpson
5a18728cec CPack/Archive: Add support for setting UID/GID in archive
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
2025-11-08 09:25:08 -05:00
Brad King
c7ba476337 Merge topic 'gtest-discovery-race-condition'
72ce711899 GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11392
2025-11-07 09:18:17 -05:00
Brad King
72ce711899 GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()
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
2025-11-06 14:28:30 -05:00
Peter Kokot
c05e60ecb2 GNUInstallDirs: Add more info about DATADIR 2025-11-01 21:42:55 +01:00
Alex Turbov
2ca11db2e3 pre-commit: version bump typos hook plus fix found typos
Backport commit 8de02a14c8 (ci(pre-commit): version bump `typos` hook
plus fix found typos, 2025-10-23) to the CMake 4.2 release branch.
2025-10-30 17:43:16 -04:00
Brad King
daa7926c68 GoogleTest: Report timeout duration on discovery failure 2025-10-30 13:00:56 -04:00
Brad King
922fb7fd63 Merge topic 'macos-no-per-arch-sysroot'
1925477cb7 macOS: Do not incorrectly search for per-arch SDKs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11372
2025-10-30 08:54:34 -04:00
Brad King
1925477cb7 macOS: Do not incorrectly search for per-arch SDKs
Extend commit a9b41195d2 (Handle multi-arch sysroots on Apple platforms,
2019-07-26, v3.17.0-rc1~287^2) to recognize versioned macOS SDK names.

Fixes: #27340
2025-10-29 14:50:51 -04:00
Brad King
932ba12b41 Merge topic 'python_debug_postifx_no_interpreter'
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
2025-10-28 09:34:33 -04:00
Brad King
3ef5ce55db Merge topic 'python_debug_postifx_no_interpreter' into release-4.2
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
2025-10-28 09:34:29 -04:00