Commit Graph

14539 Commits

Author SHA1 Message Date
Marc Chevrier
9b0510fa57 FindPython: add support for multiple searches in same directory
In some situations, like cross-compilation, it can be required to search for
the host python interpreter as well as the cross-compilation development
artifacts.
By managing different prefixes for the artifacts, multiple and independent
searches can be achieved.
2025-01-11 15:47:06 +01:00
Brad King
d949e7980c Merge topic 'FindBISON-OPTIONS-keyword'
211cec0f20 FindBISON: Add new keyword OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10129
2025-01-08 09:29:38 -05:00
Brad King
2f4d20bc32 Merge topic 'FindFLEX-OPTIONS-keyword'
d63ffb4116 FindFLEX: Add new keyword OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10137
2025-01-08 09:28:54 -05:00
Brad King
44db110d63 Merge topic 'FindFLEX-empty-COMPILE_FLAGS'
1310d43380 FindFlex: Add COMMAND_EXPAND_LISTS to remove empty arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10125
2025-01-08 09:26:36 -05:00
Brad King
5534b4afcf Merge topic 'FindBoost-1.87'
f485f94d1a FindBoost: Add support for Boost 1.87

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10147
2025-01-08 09:25:08 -05:00
Brad King
f485f94d1a FindBoost: Add support for Boost 1.87
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_87_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.87.0 source tree.

Dependencies differ from 1.86:

* Boost.Log no longer depends on Boost.Chrono

Fixes: #26562
2025-01-07 15:41:31 -05:00
Peter Kokot
211cec0f20 FindBISON: Add new keyword OPTIONS
This adds a new keyword OPTIONS which is a semicolon-separated list of
command-line options added to bison command line. This enables adding
options more intuitively. It mainly adds options as quoted arguments
which among other things enables adding paths containing spaces and
similar.

Fixes:
- https://gitlab.kitware.com/cmake/cmake/-/issues/23301
2025-01-06 06:41:57 +01:00
Peter Kokot
d63ffb4116 FindFLEX: Add new keyword OPTIONS
This adds a new keyword OPTIONS which is a semicolon-separated list of
command-line options added to flex command line. This enables adding
options more intuitively. It mainly adds options as quoted arguments
which among other things enables adding paths containing spaces and
similar.

Fixes:
- https://gitlab.kitware.com/cmake/cmake/-/issues/23301
2025-01-06 06:41:41 +01:00
Marc Chevrier
b779fcf6a0 Merge topic 'FindPython-enhance-artifacts-consistency'
b1f0c5e476 FindPython: enhance artifacts consistency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10136
2025-01-03 06:22:09 -05:00
Peter Kokot
4d2f1325ef CheckLibraryExists: Enhance documentation
This syncs the code style using lowercase, explains the behavior in a
paragraph-style like in other chapters, and adds few basic usage
examples. Additionally, an explanation is added, when to use this
module.
2025-01-02 01:36:16 +01:00
Marc Chevrier
b1f0c5e476 FindPython: enhance artifacts consistency
Avoid to rely on _Python_EXECUTABLE variable if the Interpreter component
is not part of the current search.
2025-01-01 17:29:21 +01:00
Marc Chevrier
4771754c0d Merge topic 'CheckStructHasMember-enhance-documentation'
bcdfd6858d CheckStructHasMember: Improve and extend documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10119
2024-12-30 09:40:41 -05:00
Marc Chevrier
a840f889f8 Merge topic 'patch-flex-bison-docs-2'
559a8d088a FindFLEX: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10128
2024-12-28 05:55:06 -05:00
Marc Chevrier
3107865fc2 Merge topic 'patch-flex-bison-docs'
1dcd38bdd0 FindBISON: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10126
2024-12-28 05:54:19 -05:00
Marc Chevrier
ed0f2d2f12 Merge topic 'patch-check-variable-exists'
e1723cab81 CheckVariableExists: Improve documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10122
2024-12-28 05:52:02 -05:00
Peter Kokot
1dcd38bdd0 FindBISON: Update documentation
This fixes typos and syncs the style according to other documentation
pages.
2024-12-27 20:30:25 +01:00
Peter Kokot
559a8d088a FindFLEX: Update documentation
This fixes typos and syncs the style according to other documentation
pages.
2024-12-26 18:44:23 +01:00
Peter Kokot
e1723cab81 CheckVariableExists: Improve documentation
This uses the lowercase command signature and refactors the description
according to other similar documentation pages.
2024-12-22 17:30:49 +01:00
Peter Kokot
bcdfd6858d CheckStructHasMember: Improve and extend documentation
This uses the lowercase command signature and refactors the description
according to other similar documentation pages.

The LANGUAGE option is described separately.
2024-12-22 17:07:44 +01:00
Peter Kokot
2116b3460b Help: Use lower-case style in documentation 2024-12-22 16:56:46 +01:00
Marc Chevrier
9df2ccb1e8 Merge topic 'Help-FindPython-Fix-typo'
e7ea2998fb Help: FindPython: fix typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10121
2024-12-22 07:17:53 -05:00
Peter Kokot
1310d43380 FindFlex: Add COMMAND_EXPAND_LISTS to remove empty arguments
This is a follow-up of 3ffc8a6b61

When using generator expressions in the COMPILE_FLAGS argument, and the
generator expression expands to an empty string, command gets an empty
argument with double quotes where flex command-line tool errors out
with `/usr/bin/flex: can't open` error. This removes empty arguments
from the created flex command.
2024-12-22 00:11:28 +01:00
Marc Chevrier
e7ea2998fb Help: FindPython: fix typo 2024-12-21 17:50:25 +01:00
Brad King
71e2596a73 NVHPC: Add support for CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN
NVHPC has a `--gcc-toolchain=` flag just like LLVM/Clang and IntelLLVM.
2024-12-16 14:15:56 -05:00
Brad King
265bc4e946 Merge topic 'hurd-linker'
c4f64cee36 CMakeParseImplicitLinkInfo: Do not mistake ld.so for a linker
a47283801e hurd: Add GNU linker options
4d1066c578 hurd: Add more GNU options support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10092
2024-12-13 09:00:27 -05:00
Samuel Thibault
c4f64cee36 CMakeParseImplicitLinkInfo: Do not mistake ld.so for a linker
Our pattern meant to match `/usr/bin/ld`, `ld.exe`, etc., unfortunately also
captures `ld.so`, which happens to be the dynamic linker on x86 GNU/Hurd.
Through `linker_tool_regex`, this:

    elseif("${line}" MATCHES "${linker_tool_regex}")
      set(linker_tool "${CMAKE_MATCH_2}")
    endif()

is then assuming that:

    /.../collect2 [...] -dynamic-linker /lib/ld.so [...]

claims the linker to be `/lib/ld.so`, and stops there, without noticing
further down in the log:

    /usr/bin/ld [...] -dynamic-linker /lib/ld.so [...]

which is what should be claiming `/usr/bin/ld` is the linker.
2024-12-12 09:20:37 -05:00
Samuel Thibault
a47283801e hurd: Add GNU linker options
Fixes: #26518
2024-12-12 09:19:36 -05:00
Marc Chevrier
11aff3c490 FindPython: enhance Development artifacts lookup in virtual environment
To enable to locate development artifacts, in the context of virtual
environment, without requiring Interpreter component, rely on the
configuration file pyvenv.cfg.

Fixes: #26505
2024-12-12 13:53:11 +01:00
Samuel Thibault
4d1066c578 hurd: Add more GNU options support 2024-12-11 20:18:56 +01:00
Brad King
ed0baf1ec5 Merge topic 'rvm_refactor'
f06b2af291 Tests/FindRuby/Rvm: Honor Ruby_FIND_VIRTUALENV ONLY
a023377b86 FindRuby: Move checking of RVM and System Ruby to separate functions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10071
2024-12-10 09:18:31 -05:00
Brad King
90e3d69551 Merge topic 'hurd-rpath-origin'
8d2f6f0971 hurd: Fix runtime path test
0c452257e7 hurd: Add relative rpath support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10078
2024-12-10 09:17:30 -05:00
Brad King
27be881b3f Merge topic 'vs-clang-cl-c++23'
30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl
57da8712c1 VS: Factor out check for mixed C and C++ target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10082
2024-12-10 09:12:04 -05:00
Brad King
30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl
Since commit 474eafe28c (clang-cl: Add support for C++23, 2024-09-13,
v3.31.0-rc1~97^2) we use a Clang-specific flag to enable C++23 since
`clang-cl` has no `-std:c++23` flag, and `-std:c++latest` may enable an
even newer version of C++.  However, in `.vcxproj` files there is no way
to express a target-wide `-clang:-std=c++23` flag for only C++ sources
when the target also has C sources.  Add a special case to map back to
`-std:c++latest` for targets with C++23 and C together.

Fixes: #26508
2024-12-09 14:57:35 -05:00
Samuel Thibault
0c452257e7 hurd: Add relative rpath support 2024-12-09 01:22:18 +01:00
Peter Kokot
70ccf47e60 Help: Add more examples for condition syntax in commands
Issue: #26487
2024-12-06 03:09:46 +01:00
cfis
a023377b86 FindRuby: Move checking of RVM and System Ruby to separate functions. 2024-12-04 13:21:04 -08:00
David Tenty
a6f2e9eded IBMClang: Express compiler information as a Clang variant
De-duplicate IBMClang compiler information by detecting the base clang
version and following the same logic as we do for any other clang of
that version.  This helps maintain support for new IBMClang features
inherited from new base Clang versions.

We already use this approach for other Clang variants, like CrayClang
and FujitsuClang.
2024-12-04 14:01:52 -05:00
David Tenty
cac5eb3df2 CompilerId: Ensure internal compiler version string is not optimized out
This was missed in commit 27579e9cf1 (FujitsuClang: Add support for the
Fujitsu compiler in Clang mode, 2020-12-22, v3.21.0-rc1~402^2~5).
2024-12-04 09:28:57 -05:00
Brad King
39b96cb0d9 Merge topic 'vs-WindowsKernelModeDriver'
2709f07b4d VS: Add minimal support for Windows Kernel Mode Drivers
fec276e632 cmVisualStudio10TargetGenerator: Use inline member initialization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10042
2024-12-04 08:52:56 -05:00
Brad King
61a57ea717 Merge topic 'doc-check-run'
94b6f8bf4a Help: Check*Runs requires exit code 0 for success

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10047
2024-12-04 08:51:40 -05:00
Brad King
5c490d671a Merge topic 'find_ruby_cleanup'
48bf16fba1 FindRuby: Remove unneeded code and define all functions at the top-level.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10063
2024-12-04 08:50:51 -05:00
scivision
94b6f8bf4a Help: Check*Runs requires exit code 0 for success
Explicitly state this requirement to avoid ambiguity in what is
'success' of a program.
2024-12-03 16:00:26 -05:00
cfis
48bf16fba1 FindRuby: Remove unneeded code and define all functions at the top-level. 2024-12-03 12:12:59 -08:00
Joseph Snyder
2709f07b4d VS: Add minimal support for Windows Kernel Mode Drivers
Extend the experimental support for `WindowsKernelModeDriver` to the
Visual Studio generators.  Hard-code some settings for now.
2024-12-03 14:18:52 -05:00
مهدي شينون (Mehdi Chinoune)
3c3f887ff6 FindOpenMP: Fix typo on omp Fortran module name. 2024-12-03 13:42:18 -05:00
Brad King
b1ab297d07 Merge topic 'FindPython-SABIModule-handling'
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10058
2024-12-03 09:04:42 -05:00
Brad King
50afcb61f7 Merge topic 'FindPython-SABIModule-handling' into release-3.31
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10058
2024-12-03 09:04:41 -05:00
Brad King
25ef01bd65 Merge topic 'flang-openmp'
c3bada79cd FindOpenMP: Fix Finding OpenMP for LLVMFlang on Windows.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10052
2024-12-03 09:03:48 -05:00
Brad King
2af8fee380 Merge topic 'FindRuby-3.4'
21e51dca1d FindRuby: Add support for 3.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10055
2024-12-03 09:00:47 -05:00
cfis
21e51dca1d FindRuby: Add support for 3.4 2024-12-02 13:25:54 -05:00