Commit Graph

15115 Commits

Author SHA1 Message Date
Cristian Le cc6dbd194c GNUInstallDirs: Cache CMAKE_INSTALL_* with leading usr/ for install prefix /
As a consequence, `GNUInstallDirs_get_absolute_install_dir` does not
alter the `var` argument (the relative path argument).

Closes: #26834
Signed-off-by: Cristian Le <git@lecris.dev>
2025-04-29 13:49:42 -04:00
Cristian Le a7fcb1320c GNUInstallDirs: Make GNUInstallDirs_get_absolute_install_dir a function
Signed-off-by: Cristian Le <git@lecris.dev>
2025-04-29 18:05:50 +02:00
Cristian Le 03e796f9ab GNUInstallDirs: Move the common handler for SYSCONFDIR and LOCALSTATEDIR
Signed-off-by: Cristian Le <git@lecris.dev>
2025-04-29 18:05:50 +02:00
Brad King ead4355b16 Merge topic 'cross-compile-macos'
eb8facd396 macOS: Avoid relying on sw_vers when cross-compiling from another OS
476b2a386f macOS: Remove outdated condition for CMAKE_OSX_DEPLOYMENT_TARGET

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10721
2025-04-29 11:25:51 -04:00
Brad King 3cf3980582 Merge topic 'patch-FindGTK'
e4554c0f16 FindGTK*: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10718
2025-04-29 11:20:28 -04:00
Brad King 9dcb87f87a Merge topic 'patch-FindXCTest'
72e5ebcbd3 FindXCTest: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10719
2025-04-29 11:06:04 -04:00
Brad King 2cdcf68235 Merge topic 'patch-FindMFC'
bc9faec5e5 FindMFC, CMAKE_MFC_FLAG: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10720
2025-04-29 11:04:19 -04:00
Brad King 054f05fd01 Merge topic 'iar-cstat-binutils'
6e6a1e472b IAR: Add the C-STAT tools to CMakeFindBinUtils

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10714
2025-04-28 11:16:57 -04:00
Brad King b5670654e5 Merge topic 'patch-FindOpenSceneGraph'
134095a4b3 FindOpenSceneGraph: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10707
2025-04-28 11:15:45 -04:00
Brad King eb8facd396 macOS: Avoid relying on sw_vers when cross-compiling from another OS
We have a few code paths needed only to support builds hosted on
macOS 10.4.  Update the conditions to work when cross-compiling
to macOS from another platform.

Fixes: #26814
2025-04-28 08:53:01 -04:00
Brad King 476b2a386f macOS: Remove outdated condition for CMAKE_OSX_DEPLOYMENT_TARGET
Revert commit 2853326e7a (BUG: Only set CMAKE_OSX_DEPLOYMENT_TARGET on
Mac OSX 10.4 or later, 2009-01-27, v2.8.0~1169).  AFAIK no one is using
macOS versions older than 10.4 anymore.
2025-04-28 08:37:33 -04:00
Peter Kokot bc9faec5e5 FindMFC, CMAKE_MFC_FLAG: Update documentation
FindMFC:
- Synced module documentation with other similar find modules.
- Added examples section.
- Added reference link to CMAKE_MFC_FLAG variable.

CMAKE_MFC_FLAG:
- Added separate examples section.
- Mentioned FindMFC module.
- Used target_compile_definitions() instead of add_definitions().
2025-04-28 02:36:29 +02:00
Peter Kokot 72e5ebcbd3 FindXCTest: Update documentation
- Module documentation synced with other similar find modules.
- Added examples section.
- Added note about Swift Testing framework, which supersedes the XCTest.
- Added note about the XCTEST target property and synced docs a bit.
- Used word "commands" instead of "macros" or "functions".
2025-04-28 00:12:14 +02:00
Peter Kokot e4554c0f16 FindGTK*: Update documentation
- Updated module documentation.
- Added "Examples" section showing some basic usage.
- Added "See Also" section in FindGTK to reference the FindGTK2.
- Added usage of pkg-config in examples for newer GTK versions.

Issues: #15888, #22693
2025-04-27 16:04:42 +02:00
Brad King 782f054ccb Merge topic 'check_language-fix'
89df8efba4 CheckLanguage: Bias compiler selection using already-enabled languages
f290240b0b CheckLanguage: Simplify test project generation
7ae8764710 Tests: Extend CMakeOnly.CheckLanguage to enable languages whose checks succeed
a049413bb6 Tests: Extend CMakeOnly.CheckLanguage to cover ASM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10705
2025-04-25 08:54:31 -04:00
Peter Kokot 134095a4b3 FindOpenSceneGraph: Update documentation
- Extended examples section and changed example to use a locally created
  imported target showing how to add usage requirements to project.
- Mention of CMake 2.x removed as these version notes are now being
  cleaned in the CMake 4 documentation (CMake docs are at this point
  considering the 2.8.12.2 as the initial state upon which new and
  changed items are documented through versions).
- Extended components section.
- Added See Also section.
- Removed internal comment about naming conventions. Find modules
  distributed with CMake ideally should follow standard find modules
  naming conventions for variables and to have it synced with
  other find modules shipped with CMake.
- Used the OpenSceneGraph_FOUND variable (CMake 3.3). The uppercased
  OPENSCENEGRAPH_FOUND is also set to the same value.
- Added note in introduction how to include headers.
2025-04-25 08:47:13 -04:00
Brad King 93f59ed145 Merge topic 'patch-docs-cmake-versions'
b787b94d1a Help: Remove versionadded for CMake 2.x

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10708
2025-04-25 08:46:33 -04:00
Brad King 7c3fb57b21 Merge topic 'patch-FindLua'
e83f322938 FindLua*: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10706
2025-04-25 08:44:33 -04:00
Brad King 203a5e6985 Merge topic 'patch-FindJNI'
27c1b84ef7 FindJNI: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10709
2025-04-25 08:43:37 -04:00
Felipe Torrezan 6e6a1e472b IAR: Add the C-STAT tools to CMakeFindBinUtils 2025-04-25 10:49:24 +02:00
Oleg Derevenetz 89df8efba4 CheckLanguage: Bias compiler selection using already-enabled languages
In a project that has enabled C or CXX, we bias ASM and Fortran compiler
selection to match.  Propagate this bias into the `check_language` test
project so that if it succeeds, we will select the same compiler when
enabling the tested language in the calling project.

Fixes: #19350
2025-04-24 11:02:45 -04:00
Brad King f290240b0b CheckLanguage: Simplify test project generation
Inspired-by: Oleg Derevenetz <oleg-derevenetz@yandex.ru>
2025-04-24 11:02:45 -04:00
Peter Kokot e83f322938 FindLua*: Update documentation
This updates FindLua, FindLua50, and FindLua51 modules:

- Added examples section.
- Synced module documentation with other similar find modules.
- Added notes about Lua 5.0 and 5.1 branches being obsolete and newer
  version should be used with the FindLua module.
- For the example of including Lua headers the angled includes are now
  used instead of quoted style. Angled brackets are more convenient
  for system and such dependencies as they indicate that include
  directories have priority over local files found in the current
  directory by the compiler.
- Removed mentioning CMake 2.x for version variables being introduced as
  these are now being cleaned in the CMake 4 documentation (CMake docs
  are at this point considering the 2.8.12.2 as the initial state upon
  which new and changed items are documented through versions - at least
  for modules).
- `<PackageName>_FOUND` variables used (since CMake 3.3), the uppercased
  `<PACKAGENAME>_FOUND` are also set to the same value.
2025-04-24 14:06:45 +02:00
Brad King 0bc051c180 Merge topic 'automoc-predefs'
ccef69bde4 AUTOMOC: Avoid compiler warnings while computing predefines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10702
2025-04-24 07:45:21 -04:00
Brad King ccef69bde4 AUTOMOC: Avoid compiler warnings while computing predefines
LLVM/Clang 20, when invoked as `clang++ -E -c ...`, now warns:

    warning: argument unused during compilation: '-c'

Drop the unnecessary `-c` flag.  Also add a `-w` flag to suppress
warnings so their text is not parsed as predefines.
2025-04-24 07:07:00 -04:00
Peter Kokot 27c1b84ef7 FindJNI: Update documentation
- Added examples section.
- Synced module documentation a bit with other similar find modules.
- Added separate components section.
2025-04-24 01:10:35 +02:00
Peter Kokot b787b94d1a Help: Remove versionadded for CMake 2.x
This removes all `versionadded` RST directives mentioning CMake 2.x
branch from CMake modules.  These version notes are now being cleaned in
the CMake 4 documentation (CMake docs are at this point considering the
2.8.12.2 as the initial state upon which new and changed items are
documented through versions).
2025-04-23 23:03:36 +02:00
Peter Kokot 3a266612ec FindCxxTest: Update documentation
- Synced module documentation with other similar find modules.
- Extended example with imported target.
- Removed mentioning CMake 2.x in versionadded RST directives as these
  are now being cleaned in the CMake 4 documentation (CMake docs are at
  this point considering the 2.8.12.2 as the initial state upon which
  new and changed items are documented through versions - at least for
  modules).
- Added separate "Deprecated Variables" section.
- Changed the deprecation version number to 2.8.3 as it is for CMake
  version and not the module internal version 1.3.
- Added separate "Cache Variables" section.
- Used lowercase style for the cxxtest_add_test() command.
2025-04-23 17:47:16 +02:00
Brad King 9510900be0 Merge topic 'clang-cuda-default-arch'
47ddbc9ded CUDA/Clang: Prefer NVCC's default architecture for each CUDA Toolkit version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !10698
2025-04-23 08:57:07 -04:00
Brad King 66b0b66fe1 Merge topic 'patch-FindProducer'
825d38a3cb FindProducer: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10694
2025-04-23 08:39:46 -04:00
Brad King a37f463f5e Merge topic 'patch-FindODBC'
92a6069ed0 FindODBC: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10697
2025-04-23 08:35:27 -04:00
Brad King 82802ab740 Merge topic 'patch-FindVulkan'
4376b15bae FindVulkan: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10693
2025-04-23 08:34:04 -04:00
Brad King 47ddbc9ded CUDA/Clang: Prefer NVCC's default architecture for each CUDA Toolkit version
This makes the default CUDA architecture consistent across compilers,
and makes it more likely that the resulting binary will run on the
user's hardware.

This also makes hardware requirements for CI builds more consistent.
See commit 4f2178c4a8 (ci: add tags to tie CUDA jobs to runners with
hardware supporting them, 2025-04-21).
2025-04-22 09:51:02 -04:00
Brad King 19e6184a7a Merge topic 'clang-msvc-c++26'
338f88a809 Clang: MSVC C++26 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10685
2025-04-22 09:17:13 -04:00
Brad King cd44c127ef Merge topic 'FindPython-SABI_LIBRARY-definition'
25cbaf162f Merge branch 'backport-FindPython-SABI_LIBRARY-definition'
bd7a27bcc7 FindPython: fix the definition of SABI artifacts
554ef95470 FindPython: fix the definition of SABI artifacts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10687
2025-04-22 09:15:36 -04:00
Brad King b24c9d4408 Merge topic 'patch-Findosg_functions'
443440a75b Findosg_functions: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10680
2025-04-22 09:14:25 -04:00
Brad King 300dfc13e3 Merge topic 'patch-FindIce'
a993d12605 FindIce: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10681
2025-04-22 09:13:20 -04:00
Brad King 58c1683f8d Merge topic 'patch-FindGLUT'
eecc3d545b FindGLUT: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10686
2025-04-22 09:12:12 -04:00
Peter Kokot 92a6069ed0 FindODBC: Update documentation
- Synced module documentation with other similar find modules.
- Added examples section describing module usage, highlighting the
  imported target, and how to override ODBC configuration through
  cache variables on Unix-like systems. Some exotic or custom ODBC
  implementations might sometimes need such steps.
2025-04-22 14:22:29 +02:00
Peter Kokot 825d38a3cb FindProducer: Update documentation
- Added note about Producer library being obsolete.
- Added examples section.
- Module documentation updated and synced with other similar find
  modules and OpenSceneGraph related find modules.
- Used Producer_FOUND variable. The PRODUCER_FOUND is also set to the
  same value as of CMake 3.3.
2025-04-22 13:50:46 +02:00
Peter Kokot 4376b15bae FindVulkan: Update documentation
- Refactored components section.
- Module documentation synced with other similar find modules.
- Added examples section.
- Removed version note for VULKAN_SDK (this environment variable was
  used since 3.7 when module got introduced to CMake).
- Added missing volk component.
2025-04-22 03:00:32 +02:00
Raul Tambre 338f88a809 Clang: MSVC C++26 support
C++26 is implied by `/std:c++latest` since LLVM 17, commit `b763d6a4ed`.
2025-04-21 12:22:29 -04:00
Marc Chevrier bd7a27bcc7 FindPython: fix the definition of SABI artifacts
Fixes: #26881
2025-04-21 11:47:49 -04:00
Brad King 15daf279f2 Merge topic 'swift-warning-as-error'
dfa78c4868 Swift: Honor COMPILE_WARNING_AS_ERROR for command-line build systems

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10660
2025-04-21 09:38:45 -04:00
Brad King b913544f0f Merge topic 'patch-FindOpenThreads'
5d721d4f1f FindOpenThreads: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10677
2025-04-21 09:35:32 -04:00
Peter Kokot eecc3d545b FindGLUT: Update documentation
- Synced module documentation with other similar find modules.
- Added examples section.
- Refactored the obsolete variables section to only mention in the
  result variables that GLUT_INCLUDE_DIRS should be used instead of
  the previously misused cache variable GLUT_INCLUDE_DIR. The
  GLUT_INCLUDE_DIR as such is not actually deprecated/obsolete as it is
  still used to find GLUT (only its previous usage way is
  changed/obsolete).
2025-04-21 13:39:00 +02:00
Peter Kokot a993d12605 FindIce: Update documentation
- Module documentation synced with other similar find modules.
- Added examples section.
- Extended components into a separate section.
- Components listed with hlist RST directive
- Added and updated versions for variables when they got introduced.
- Fixed variable name from Ice_ICEBOXXX11_EXECUTABLE to
  Ice_ICEBOX++11_EXECUTABLE.
- Fixed typo in C++ component name: s/IceGrid/IceGrid++11
2025-04-20 02:23:53 +02:00
Peter Kokot 443440a75b Findosg_functions: Update documentation
Added note to highlight that this module is for internal usage in
OpenSceneGraph (OSG) find modules.
2025-04-20 01:35:25 +02:00
Brad King 2781e1c58d Merge topic 'patch-FindCURL-features-protocols-26866'
4acfe363a2 FindCURL: Fix hardcoded outdated protocols and features

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10666
2025-04-18 10:34:24 -04:00
Brad King 0a940684f4 Merge topic 'patch-FindFLTK'
0a28689e5b FindFLTK, FindFLTK2: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10665
2025-04-18 10:31:52 -04:00