Commit Graph

12993 Commits

Author SHA1 Message Date
Brad King
e094bff983 Merge topic 'FindOpenSSL-static-z'
1b7804edd0 FindOpenSSL: use extra dependencies from pkg-config as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7986
2022-12-06 08:05:53 -05:00
Brad King
f1f064b7b2 Merge topic 'cxx-module-map-clang'
2c558cfd1b gitlab-ci: add CI jobs for Clang with C++20 modules
abd42e9cfc ci: add a Docker container for clang support of C++20 modules
51093f3002 Clang-FindBinUtils: also find `clang-scan-deps`
0b333de923 ci: add C++ module rules file for Clang
21b9fb1e8c cmCxxModuleMapper: support the `clang` module map format
9c66224668 cmNinjaTargetGenerator: skip setting `depfile` for `none` scantypes
9123a0991f cmNinjaTargetGenerator: use `.clear()` to empty out some strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !7978
2022-12-06 08:04:18 -05:00
Brad King
b82f9dce70 Merge topic 'CheckSymbolExists-restore-newline'
9273b8f421 CheckSymbolExists: Restore newline at end of test source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Petr Nechaev <petr.nechaev@cogentembedded.com>
Merge-request: !7979
2022-12-05 12:51:24 -05:00
Rolf Eike Beer
1b7804edd0 FindOpenSSL: use extra dependencies from pkg-config as well
This is important if OpenSSL is linked against an external zlib.
2022-12-05 13:00:41 +01:00
Craig Scott
d09dc11911 Merge topic 'FetchContent-SYSTEM'
4b85141f83 FetchContent: Don't pass SYSTEM through to sub-build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7977
2022-12-05 06:23:28 -05:00
Ben Boeckel
51093f3002 Clang-FindBinUtils: also find clang-scan-deps
`clang-scan-deps` will be required for C++20 module scanning purposes.
2022-12-02 13:04:34 -05:00
Andrey Vostrikov
9273b8f421 CheckSymbolExists: Restore newline at end of test source
Refactoring in commit db76876db5 (Modules: Use new SOURCES_FROM_*
try_compile (1/2), 2022-09-26, v3.25.0-rc1~74^2~1) accidentally dropped
the final newline of the test source, which was previously provided by
the input to `configure_file`.  The C standard requires a newline at the
end of file, so add one explicitly.

Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
2022-12-02 09:20:09 -05:00
Craig Scott
4b85141f83 FetchContent: Don't pass SYSTEM through to sub-build
If we don't filter out SYSTEM from the arguments we pass
through to ExternalProject_Add(), it gets appended as a
list item to whatever arguments precede it because
ExternalProject_Add() doesn't recognize it as a keyword.

Fixes: #24201
2022-12-02 18:41:18 +11:00
Brad King
2a139018ce Merge topic 'find_cudatoolkit_avoid_nvhpc_symlinks'
9d012b1f69 FindCUDAToolkit: Ensure that paths provided have no symlinks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7974
2022-12-01 08:02:49 -05:00
Brad King
5f7b953342 Merge topic 'watcom-win16'
ef9ce3aadb OpenWatcom: Add support for 16-bit Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7975
2022-12-01 08:01:49 -05:00
Brad King
c44bae98cd Merge topic 'msys-pkgconf'
903ae3c71b MSYS Makefiles: Modernize search paths for common MSYS 'make' locations
2057066e05 FindMsys: Modernize search paths for common MSYS locations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7955
2022-12-01 08:00:24 -05:00
jbs
ef9ce3aadb OpenWatcom: Add support for 16-bit Windows
Add support for NE Win16 binaries.  We already support 16-bit DOS and OS/2.
2022-11-30 18:22:48 -05:00
Robert Maynard
9d012b1f69 FindCUDAToolkit: Ensure that paths provided have no symlinks
Fixes: #24188
2022-11-30 16:39:00 -05:00
Ziemowit Łąski
903ae3c71b MSYS Makefiles: Modernize search paths for common MSYS 'make' locations 2022-11-30 08:48:29 -05:00
Ziemowit Łąski
2057066e05 FindMsys: Modernize search paths for common MSYS locations 2022-11-30 08:48:14 -05:00
Marc Chevrier
77d734aede FindPython: add support for Stable ABI
Fixes: #24141
2022-11-29 16:48:08 +01:00
Brad King
be9d93ecef Merge topic 'iar-rsp-on-objects'
a51e01f2ec IAR: Add response flag for files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7957
2022-11-29 10:33:50 -05:00
Brad King
5618eeef93 Merge topic 'source-from-var'
f6b99c5087 Check*: Restore support for arbitrary result variable names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7960
2022-11-29 10:27:26 -05:00
Brad King
3f05665a3f Merge topic 'source-from-var' into release-3.25
f6b99c5087 Check*: Restore support for arbitrary result variable names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7960
2022-11-29 10:27:25 -05:00
Brad King
07d1f4d329 Merge topic 'FindRuby-doc-fix'
0d7f40a5c4 FindRuby: Remove documentation for non-existent Ruby_ROOT_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7954
2022-11-29 10:25:40 -05:00
Brad King
0da7ec03dd Merge topic 'FindRuby-doc-fix' into release-3.25
0d7f40a5c4 FindRuby: Remove documentation for non-existent Ruby_ROOT_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7954
2022-11-29 10:25:39 -05:00
Brad King
44f2c8f1a4 Merge topic 'android-no-LINUX'
19509249a5 Android: Revert setting LINUX variable on Android target systems

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Nevala <robert.nevala@king.com>
Acked-by: n00b42 <github.com@mail.msdigital.de>
Merge-request: !7963
2022-11-29 10:24:22 -05:00
Brad King
7eb3cb19bc Merge topic 'android-no-LINUX' into release-3.25
19509249a5 Android: Revert setting LINUX variable on Android target systems

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Nevala <robert.nevala@king.com>
Acked-by: n00b42 <github.com@mail.msdigital.de>
Merge-request: !7963
2022-11-29 10:24:21 -05:00
Brad King
a7a7a76e02 Merge topic 'msvc-cxx-no-optin-experimental-flag'
12e4bc73cb MSVC: don't opt into dyndep support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7965
2022-11-29 10:22:48 -05:00
Brad King
51235d14eb Merge topic 'msvc-cxx-no-optin-experimental-flag' into release-3.25
12e4bc73cb MSVC: don't opt into dyndep support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7965
2022-11-29 10:22:47 -05:00
Brad King
4751c9399e Merge topic 'revert-find_library-msvc-libfoo.a'
955d6245c1 MSVC: Revert "Teach find_library to consider the 'libfoo.a' naming convention"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7962
2022-11-29 10:15:57 -05:00
Brad King
4c2952c5cb Merge topic 'revert-find_library-msvc-libfoo.a' into release-3.25
955d6245c1 MSVC: Revert "Teach find_library to consider the 'libfoo.a' naming convention"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7962
2022-11-29 10:15:55 -05:00
Brad King
1efae6d4a7 Merge topic 'mingw-windres'
b47092fddb MinGW: Fix regression when windres is not found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7964
2022-11-29 10:06:53 -05:00
Brad King
25f6f98eb1 Merge topic 'mingw-windres' into release-3.25
b47092fddb MinGW: Fix regression when windres is not found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7964
2022-11-29 10:06:52 -05:00
Brad King
b47092fddb MinGW: Fix regression when windres is not found
The fix in commit e9755bc7c1 (MinGW: Restore using windres when
toolchain-prefixed name is not available, 2022-08-15, v3.24.1~4^2)
incorrectly listed two entries in `CMAKE_RC_COMPILER_INIT`, which is
only meant to have one value.  Revise the logic to support multiple
platform-specific names for the Windows Resource Compiler while still
only using one name as the fallback when it is not found.

Fixes: #24190
Issue: #23841
2022-11-28 19:09:04 -05:00
Ben Boeckel
12e4bc73cb MSVC: don't opt into dyndep support
Instead, just set the variables for how scanning works since that is
part of the compiler mechanisms.

Fixes: #24198
2022-11-28 18:02:51 -05:00
Brad King
19509249a5 Android: Revert setting LINUX variable on Android target systems
Since commit 62cd3904bf (variable: Set LINUX variable on Linux target
systems, 2022-08-10, v3.25.0-rc1~320^2), the `Platform/Android` module
inherits the `LINUX` variable setting from `Platform/Linux`.  While
Android may use a Linux kernel, `CMAKE_SYSTEM_NAME` is not `Linux`, and
the platform does not follow conventions of most Linux distributions.

Fixes: #24196
2022-11-28 16:58:54 -05:00
Zhong Ruoyu
f6b99c5087 Check*: Restore support for arbitrary result variable names
In commit db76876db5 (Modules: Use new SOURCES_FROM_* try_compile (1/2),
2022-09-26, v3.25.0-rc1~74^2~1) and commit 41f7b1169a (Modules: Use new
SOURCES_FROM_* try_compile (2/2), 2022-09-26, v3.25.0-rc1~74^2) the
switch to `SOURCE_FROM_*` required a stronger precondition (the second
argument to check_include_files must not have path components) than
before (any variable name could be used).

Fix that by transforming the variable name to a C identifier before
feeding it to try_compile as a filename.  The filename is unspecified by
the documentation, and the file itself is only temporary, so that should
work fine.

I have gone through all the occurrences of `SOURCE_FROM_*`, and
identified these two that require changes.  The rest should work fine as
the filenames do not depend on input variable names.

Fixes: #24204
2022-11-28 16:53:12 -05:00
Brad King
955d6245c1 MSVC: Revert "Teach find_library to consider the 'libfoo.a' naming convention"
Revert commit be848a71b0 (MSVC: Teach find_library to consider the
'libfoo.a' naming convention, 2022-09-19, v3.25.0-rc1~111^2).  When
targeting the MSVC ABI, this causes GNU-ABI libraries to be found in
cases they were not previously, and broke existing builds.  Revert the
change pending further discussion on how to handle the motivating use
case.

Issue: #23975
Fixes: #24168
2022-11-28 15:42:27 -05:00
Hannes Braun
0d7f40a5c4 FindRuby: Remove documentation for non-existent Ruby_ROOT_DIR
Documentation was added by commit 905d5667e8 (FindRuby: Add support for
RVM installations, 2020-03-23, v3.18.0-rc1~497^2), but this feature was
never implemented.

Closes: #21528
2022-11-28 10:35:00 -05:00
Felipe Torrezan
a51e01f2ec IAR: Add response flag for files 2022-11-27 12:14:45 +01:00
Brad King
9b9a421668 Merge topic 'find_cuda_toolkit_support_symlink_math_dirs'
989d50d7fc FindCUDAToolkit: Support nvhpc splayed layouts without symlinks
207518b6e8 FindCUDAToolkit: Handle CUDAToolkit_TARGET_DIR dir being a symlink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7945
2022-11-23 07:11:59 -05:00
Brad King
e1b757602c Merge topic 'find_dependency-dedup'
fb9a3d0c7d find_dependency: Avoid repeating identical dependency searches
5fbda0f572 find_dependency: Unset temporary variables before returning
591b75ee17 Tests: Add case covering transitive find_dependency calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7936
2022-11-22 09:50:12 -05:00
Brad King
a449a840bd Merge topic 'opencl_framework'
2e2c1e3ea5 OpenCL: Do not assume that OpenCL framework is always used in Apple

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7941
2022-11-22 09:46:35 -05:00
Brad King
3f0fbff9a3 Merge topic 'FindCUDA-nppicom'
3ddfdc38eb FindCUDA: Do not use CUDA_nppicom_LIBRARY in CUDA 11.0+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7938
2022-11-22 09:45:22 -05:00
Robert Maynard
989d50d7fc FindCUDAToolkit: Support nvhpc splayed layouts without symlinks 2022-11-22 09:02:08 -05:00
Isuru Fernando
2e2c1e3ea5 OpenCL: Do not assume that OpenCL framework is always used in Apple 2022-11-20 14:19:27 -06:00
Oleksii Udod
3ddfdc38eb FindCUDA: Do not use CUDA_nppicom_LIBRARY in CUDA 11.0+
Extend the change from commit 1d9f2f9714 (FindCUDA: Do not search for
the deprecated nppicom when CUDA >= 11, 2020-06-22, v3.18.0-rc3~14^2)
to also not use the `CUDA_nppicom_LIBRARY` variable.

Issue: #20845
2022-11-18 15:25:05 -05:00
Brad King
fb9a3d0c7d find_dependency: Avoid repeating identical dependency searches
Since commit 37da6af17d (find_dependency: Always search dependencies,
2019-03-29, v3.15.0-rc1~301^2) we search for a package every time it is
encountered in the transitive dependency graph traversal, even if it has
been found before.  This was done in case a new visit to a given package
requests different components than a previous visit.  However, it also
causes a lot of repeat processing that is unnecessary in the common case
that all calls share the same set of components (often none).

Restore the logic to avoid repeating the search for an already-found
package.  Handle differences in components by de-duplicating based on
the complete `find_package` call arguments.

Fixes: #23685
2022-11-18 10:31:19 -05:00
Brad King
5fbda0f572 find_dependency: Unset temporary variables before returning 2022-11-18 10:31:19 -05:00
Brad King
4391808712 Merge topic 'file-COPY_FILE-retry'
d34986036f ExternalData: Improve robustness on Windows to copy a data object to a file
efa9eec040 file(COPY_FILE): Add option to retry on Windows if input access fails
fa518188d8 cmSystemTools: Remove unused CopySingleFile overload

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7934
2022-11-18 09:40:13 -05:00
Brad King
72af27279b Merge topic 'nvhpc_fortran_extensions'
a98a82f24b Fortran: Support cuf file extension when using nvfortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7925
2022-11-18 09:32:40 -05:00
Brad King
66b64b5984 Merge topic 'FindCUDAToolkit_handle_nvptxcompiler_static_not_existing'
c7ece269da FindCUDAToolkit: Handle toolkits that don't provide nvptxcompiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7932
2022-11-18 09:23:36 -05:00
Robert Maynard
207518b6e8 FindCUDAToolkit: Handle CUDAToolkit_TARGET_DIR dir being a symlink 2022-11-18 08:42:04 -05:00
Brad King
d34986036f ExternalData: Improve robustness on Windows to copy a data object to a file
When an external data object was recently created on disk, perhaps
fetched by the current process or another process, it may be
inaccessible on Windows for a short time.  Tell our `file(COPY_FILE)`
call to retry a few times to copy the object to the final file path.

Hopefully this will resolve our long-standing spurious failures of the
`Module.ExternalData` test on Windows.
2022-11-17 15:05:07 -05:00