Commit Graph

14425 Commits

Author SHA1 Message Date
Brad King
f8ed4d7c21 FindOpenMP: Factor out compiler id lookup 2024-09-27 09:55:47 -04:00
Brad King
534923428a FindOpenMP: Simplify compiler driver check
The compiler driver's verbose flag is needed only when linking because
we parse its output to get the implicit link information added by the
OpenMP flag.
2024-09-27 09:55:47 -04:00
Brad King
42bf0f596e FindOpenMP: Simplify explicit "omp" library checks
For toolchains that do not provide a builtin `omp` library the compiler
driver's OpenMP flag should not be needed when linking.  We also do not
need the compiler driver's verbose flag because we are not parsing its
output.
2024-09-27 09:55:47 -04:00
Craig Scott
0aa445bb9c GoogleTest: Modernize policies using block() / endblock() 2024-09-27 16:42:50 +10:00
Brad King
8a59fb1c90 FindDevIL: Replace http link with its redirect 2024-09-26 09:00:46 -04:00
Brad King
f77e36aa37 FindAVIFile: Replace http link with its redirect 2024-09-26 09:00:46 -04:00
Brad King
137a2060bc BinUtils: Prefer llvm-mt over mt when compiling with Clang
The problem motivating commit 73d0d4e4b5 (BinUtils: Avoid llvm-mt
because it is missing 'mt' features we use, 2022-03-08, v3.23.0-rc3~7^2)
has been fixed in `llvm-mt` since LLVM/Clang 14.0.2.

Fixes: #26319
Issue: #23305
2024-09-25 09:12:27 -04:00
Brad King
ee151bccfe Merge topic 'cuda-host-compiler-id'
3b4d0df670 NVCC: Detect host compiler id and version
38cacd83a5 Tests: Migrate compiler id tests to RunCMake infrastructure
37173f1ccc Tests/RunCMake: Generalize construction of arguments for languages to test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9841
2024-09-23 14:18:57 -04:00
Brad King
b24c5ae8ac Merge topic 'FindJPEG-doc'
698ea5bd94 FindJPEG: Fix documentation of include directory input variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9840
2024-09-23 14:16:15 -04:00
Brad King
3b4d0df670 NVCC: Detect host compiler id and version
Report them in `CMAKE_<LANG>_HOST_COMPILER_{ID,VERSION}` variables.

Fixes: #20901
2024-09-20 17:48:33 -04:00
Brad King
9d7280b6a7 FindBZip2: Document library input variables
Since commit 5b6ca9fa3f (FindBZip2: add support for debug libraries,
2012-01-10, v2.8.8~267^2) the `find_library` commands store results in
per-config library variables.  Document them.
2024-09-20 12:06:54 -04:00
Brad King
698ea5bd94 FindJPEG: Fix documentation of include directory input variable 2024-09-20 12:03:08 -04:00
Brad King
4aca6d8327 Merge topic 'cpack-nuget-native'
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9829
2024-09-20 10:05:53 -04:00
Brad King
6323fdc9cf Merge topic 'cpack-nuget-native' into release-3.30
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9829
2024-09-20 10:05:52 -04:00
Brad King
e8597f2b09 Merge topic 'FindMatlab-mcr'
9ceca05e6b FindMatlab: Search mex and mx libraries for MCR
67e3c6b6eb FindMatlab: Cache whether MATLAB root contains MCR or MATLAB
b426ce1d04 FindMatlab: Add support for MCR distributions without mex.h
cd4782bac3 FindMatlab: Only consider versioned MCR subdirectory if it exists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9831
2024-09-20 10:04:21 -04:00
Hermann von Kleist
9ceca05e6b FindMatlab: Search mex and mx libraries for MCR
Further changes:
- Better documentation of library availabilities
- Log each library location in debug mode

Fixes: #26306
2024-09-19 15:33:19 +02:00
Hermann von Kleist
67e3c6b6eb FindMatlab: Cache whether MATLAB root contains MCR or MATLAB
Fixes: #26306
2024-09-19 15:33:06 +02:00
Diego Dassie
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups
Add the `native0.0` framework to the list of allowed frameworks allowing
native (C/C++) NuGet packages. This extends commit 0f4d3664a9
(CPack/NuGet: Build dependencies in groups, 2024-06-01, v3.30.0-rc1~18^2).

Fixes: #26305
2024-09-19 08:21:38 +02:00
Hermann von Kleist
b426ce1d04 FindMatlab: Add support for MCR distributions without mex.h
Consider `matrix.h` in search for include dirs.

Fixes: #26306
2024-09-18 11:19:16 -04:00
Hermann von Kleist
cd4782bac3 FindMatlab: Only consider versioned MCR subdirectory if it exists
Issue: #26306
2024-09-18 11:16:03 -04:00
Mark Abraham
3137faae6f FindHDF5: Avoid mentioning empty version when not found
Previously the not-found message confusingly mentioned an empty version
number:

    -- Could NOT find HDF5: Found unsuitable version "", ...

Don't confuse FindPackageHandleStandardArgs by defining an empty
version.
2024-09-18 10:55:11 -04:00
Brad King
671748819b Merge topic 'clang-cl-c++23'
474eafe28c clang-cl: Add support for C++23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9818
2024-09-16 06:22:35 -04:00
Brad King
8143e1b051 Merge topic 'FindPython-FIND_ABI'
f885b007b9 FindPython: ensure all ABI are searched by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Tested-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9819
2024-09-16 06:17:59 -04:00
Brad King
d31f4b645b Merge topic 'FindPython-FIND_ABI' into release-3.30
f885b007b9 FindPython: ensure all ABI are searched by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Tested-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9819
2024-09-16 06:17:57 -04:00
Brad King
474eafe28c clang-cl: Add support for C++23
Although there is no `cl -std:c++23` flag, the underlying Clang compiler
does have a C++23 mode we can activate by passing `-std=c++23` through a
`clang-cl` wrapper flag.

Fixes: #26061
2024-09-13 12:28:49 -04:00
Brad King
e701265823 Merge topic 'matlab-macos'
b90d7a3a82 FindMatlab: On macOS search under ~/Applications and /Applications

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9814
2024-09-13 09:23:18 -04:00
Brad King
1f82060c76 Merge topic 'matlab-2024b'
20412181e9 FindMatlab: Add R2024b version map

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9813
2024-09-13 09:21:15 -04:00
Marc Chevrier
f885b007b9 FindPython: ensure all ABI are searched by default
Fixes: #26279
2024-09-12 19:22:40 +02:00
scivision
b90d7a3a82 FindMatlab: On macOS search under ~/Applications and /Applications
users with locked-down macOS may not be able to install their desired Matlab
under /Applications, but may use the standard ~/Applications instead
2024-09-12 12:37:30 -04:00
scivision
20412181e9 FindMatlab: Add R2024b version map 2024-09-12 12:34:00 -04:00
Brad King
747fa20ad6 Merge topic 'proto'
1dc1d000a0 FindProtobuf: Fix IMPORT_DIRS handling and relative directory generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9809
2024-09-12 08:16:53 -04:00
Xiong Nandi
1dc1d000a0 FindProtobuf: Fix IMPORT_DIRS handling and relative directory generation
Append ${CMAKE_CURRENT_SOURCE_DIR} to `_protobuf_include_path` last, since
protoc will search the path in order.

Besides, we have to figure out the output directory by iterating through the
include paths and checking for valid relative paths.
2024-09-11 12:56:28 -04:00
Brad King
dd023d9707 Merge topic 'add_custom_command-arg-handling'
ec519f3e97 add_custom_command: Validate arguments more rigorously
8dc8be0884 AndroidTestUtilities: Remove DEPENDS that was being silently ignored
316840b430 Tests: Add missing POST_BUILD to custom commands
f5f80305ef ExternalProject: Ensure keywords requiring an argument have one

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9785
2024-09-11 09:32:24 -04:00
Craig Scott
8dc8be0884 AndroidTestUtilities: Remove DEPENDS that was being silently ignored
The add_custom_command(TARGET) form does not support a
DEPENDS keyword, but it was silently ignored up to now. It will
soon be reported as an error, so remove the DEPENDS. The
behavior will be the same as before.

Issue: #26096
2024-09-10 08:19:08 +10:00
Aliaksandr Averchanka
9e95bd49f2 Check*: Add option to pass link directories into checks 2024-09-09 17:06:33 +03:00
Craig Scott
012d116260 Merge topic 'cmp0168-populate-nondeclare-regression'
cbb727ca6b FetchContent: Don't update verify script timestamp if it doesn't change
795e7b44f2 Help: file(CONFIGURE) only updates output file timestamp if it changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9799
2024-09-08 18:32:40 -04:00
Craig Scott
cbb727ca6b FetchContent: Don't update verify script timestamp if it doesn't change
Fixes: #26255
2024-09-06 15:53:48 +10:00
Brad King
9c5f6d22f3 Merge topic 'windows-kernel-mode-driver-includes'
b151bcfc9e WindowsKernelModeDriver: Add WDK include and link paths on MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9705
2024-09-05 09:21:35 -04:00
Brad King
2daeb0b504 Merge topic 'build-databases'
e77655555c cmExperimental: gate build database support behind a flag
23cbeb5035 ci: enable `build_database` CXXModules tests
6863c1d823 Tests/CXXModules: add tests for module commands
123107c1a4 Tests/CXXModules: add support for running targets under a given config
438038b5e1 Tests/CXXModules: support building specific targets of example trees
84bc710d84 cmGlobalGenerator: generate build database files for targets
670f753f24 cmDyndepCollation: write build database metadata
dcf9a66ffe cxxmodules: plumb control data for exporting build databases
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9708
2024-09-05 09:20:23 -04:00
Brad King
f63c7ed12a Merge topic 'linker-dependency-file-only-ELF'
c336bfffac GNU/LLD linkers: link dependency only for ELF binary format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9787
2024-09-05 09:16:56 -04:00
Brad King
7b51809d9a Merge topic 'msvc-v100-manifest-tooling'
09a47c7972 MSVC: Restore support for non-incremental linking with v100 toolset and older

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9783
2024-09-04 08:11:42 -04:00
Joseph Snyder
b151bcfc9e WindowsKernelModeDriver: Add WDK include and link paths on MSVC
Detect Windows Kernel-Mode Driver include directories and library search
paths from the WDK command-line environment.  Require toolchain files to
specify the KMDF target version via a new variable.

Since this changes the behavior of the WindowsKernelModeDriver
experimental feature, update its UUID.
2024-09-03 11:10:35 -04:00
Rüdiger Ihle
09a47c7972 MSVC: Restore support for non-incremental linking with v100 toolset and older
Since commit 0b552eb877 (MSVC: Embed manifests directly for
non-incremental vs_link_exe links, 2023-02-20, v3.27.0-rc1~438^2) we use
`/MANIFEST:EMBED`, but that is not supported by older MSVC linkers.
Restore use of the standalone manifest tool.

Update `Tests/MSManifest` to recognize `dpiAwareness` in the manifest
content as written by MSVC v100 tooling.

Fixes: #26179
2024-09-03 10:58:28 -04:00
Brad King
dcb3d7dba6 Merge topic 'CheckCompilerFlag-LLVMFlang'
e8fd9ba8e8 CheckCompilerFlag: Add support for LLVMFlang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9771
2024-09-03 10:17:24 -04:00
Marc Chevrier
c336bfffac GNU/LLD linkers: link dependency only for ELF binary format
Fixes: #26250
2024-08-30 19:04:25 +02:00
Craig Scott
f5f80305ef ExternalProject: Ensure keywords requiring an argument have one
Issue: #21089
2024-08-30 15:19:58 +10:00
scivision
e8fd9ba8e8 CheckCompilerFlag: Add support for LLVMFlang
Make checks like

    check_compiler_flag(Fortran "-Wall" HAVE_WALL)

work with LLVMFlang.
2024-08-29 13:37:37 -04:00
Brad King
989d2aff39 Merge topic 'tasking-std-flags'
86bc2b000d Tasking: Fix C and C++ compiler extension mode flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9780
2024-08-29 08:36:09 -04:00
Brad King
241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Brad King
1ad39a9cf8 UseSWIG: Simplify test for Visual Studio generators
Since commit 03c31b0395 (Drop Visual Studio 9 2008 generator,
2024-05-06, v3.30.0-rc1~134^2), the test does not need to be
version-dependent.
2024-08-28 14:12:41 -04:00