12896 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Robert Maynard
c7ece269da FindCUDAToolkit: Handle toolkits that don't provide nvptxcompiler
Some versions of the CUDA toolkit don't provide any static
libraries, and therefore we need to handle that `nvptxcompiler_static`
might not be found
2022-11-17 13:41:11 -05:00
Erlend E. Aasland
351239b776 CPack/IFW: Add support for QtIFW 4.5
Fixes: #24164
2022-11-15 16:30:50 -05:00
Brad King
d41243efc9 Merge topic 'msvc-19.34-cpp-modules' into release-3.25
0e9782b336 msvc: bless MSVC 19.34 support for C++ modules as experimental

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7745
2022-11-14 10:18:20 -05:00
Ben Boeckel
0e9782b336 msvc: bless MSVC 19.34 support for C++ modules as experimental
Visual Studio 17.4 now contains official support for what CMake needs.
2022-11-11 16:54:05 -05:00
Felipe Torrezan
f9ff6ab2d1 IAR: Fix ASM compiler architecture detection
Narrow the regex to match the actual supported architectures,
avoiding mismatched detection.

Fixes: #24145
2022-11-11 09:08:03 -05:00
Brad King
c30cd5fef1 Merge topic 'sphinx-linkcheck' into release-3.25
435b0c573c Help: Fix some redirects reported with sphinx linkcheck
ac5295a9de Help: Fix broken external links found by sphinx linkcheck

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7876
2022-11-08 09:02:30 -05:00
Brad King
5e0bd923bd Merge topic 'FindOpenSSL-mingw-lib64' into release-3.25
ed24414eee FindOpenSSL: Search "lib64" for mingw 64-bit installs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7875
2022-11-08 08:15:09 -05:00
Alex Turbov
435b0c573c Help: Fix some redirects reported with sphinx linkcheck
Mostly it's about replace `http:` with `https:` protocol.
2022-11-07 10:07:36 -05:00
Alex Turbov
ac5295a9de Help: Fix broken external links found by sphinx linkcheck 2022-11-07 10:05:41 -05:00
Christoph Seitz
0a1d558971 Tasking: Remove CMAKE_SYSTEM_PROCESSOR support per CMP0123
Architecture specific compile options should be set through
toolchain files.

Fixes: #24115
2022-11-07 09:22:02 -05:00
klytje
ed24414eee FindOpenSSL: Search "lib64" for mingw 64-bit installs 2022-11-07 09:04:00 -05:00
Brad King
7c52e9e951 Merge topic 'tasking-pic' into release-3.25
7e612977b9 Tasking: Fix PIC option for Tasking Toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Christoph Seitz <christoph.seitz@posteo.de>
Merge-request: !7862
2022-11-04 11:28:23 -04:00
Gordon Jess
7e612977b9 Tasking: Fix PIC option for Tasking Toolset
Fixes: #24114
2022-11-03 08:57:20 -04:00
Brad King
32352abbd1 Merge topic 'correct_nvptxcompiler_not_linking_to_threads' into release-3.25
62f13ed588 FindCUDAToolkit: Restore usage from multiple directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7859
2022-11-03 08:15:12 -04:00
Robert Maynard
62f13ed588 FindCUDAToolkit: Restore usage from multiple directories
Fixes #24119
2022-11-02 12:23:30 -04:00
Daniel Schürmann
73e84a392b IAR: Restore support for CMAKE_CXX_FLAGS_INIT
Prior to commit a9073db736 (IAR: update language specification
detection, 2021-09-23, v3.22.0-rc1~83^2) the `--c++`/`--eec++` flags
were stored in `CMAKE_IAR_CXX_FLAG` so that they would be used as part
of the `CMAKE_CXX_COMPILE_OBJECT` rule variable.  That commit moved the
flags to `CMAKE_CXX_FLAGS`, which also broke initialization of
`CMAKE_CXX_FLAGS` from `CMAKE_CXX_FLAGS_INIT`.  Restore the original
approach.

Fixes: #24111
2022-11-01 14:59:24 -04:00
Robert Maynard
301815eb62 FindCUDAToolkit: Add nvptxcompiler_static dependency on Threads::Threads 2022-10-31 11:48:09 -04:00
Brad King
628d1c3396 Merge topic 'ArchLinux-lib-dir' into release-3.25
988b9928e4 Linux: Avoid finding libraries using lib64 on ArchLinux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Felix Yan <felixonmars@archlinux.org>
Merge-request: !7849
2022-10-31 09:46:18 -04:00
Letu Ren
988b9928e4 Linux: Avoid finding libraries using lib64 on ArchLinux
ArchLinux uses `/lib` for 64-bit libraries and there is no `/lib64`.
However, unlike Debian, 32-bit libraries are in `/lib32`.
2022-10-30 08:52:59 -04:00
Brad King
2e5af30ce0 Ninja: Match showIncludes dependencies using console output code page
Generalize the fix from commit 37a279f8d1 (Ninja: Write msvc_deps_prefix
as UTF-8 when console codepage is UTF-8, 2020-07-31, v3.19.0-rc1~349^2).
`cl /showIncludes` output is encoded using the console output code page,
so this is the byte sequence that Ninja must use to match its lines.

Fixes: #24068
2022-10-30 08:29:55 -04:00
Brad King
919ab832e8 FindGLUT: Fix regression when pkg-config is not available
In commit a2fc4b6257 (FindGLUT: Drop the now-unnecessary exclusion of
pkg-config for multiconfig, 2022-10-13, v3.25.0-rc2~16^2) we
accidentally removed the entire condition around the `pkg-config` code
path instead of just the multi-config part.

Fixes: #24095
2022-10-27 12:39:06 -04:00
Brad King
32386d7c01 Merge topic 'nsis-licence-bom' into release-3.25
b276d9d8f1 CPack/NSIS: Document BOM mark for UTF-8 encoded LICENSE file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7820
2022-10-25 10:36:29 -04:00
Brad King
0a34bde140 Merge topic 'flang-windows' into release-3.25
166bc00399 LLVMFlang: Add a required line to define linking rules on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7818
2022-10-25 10:33:19 -04:00
Mojca Miklavec
b276d9d8f1 CPack/NSIS: Document BOM mark for UTF-8 encoded LICENSE file
Previously this requirement was only mentioned in the 3.20 release
notes.
2022-10-24 12:58:10 -04:00
مهدي شينون (Mehdi Chinoune)
166bc00399 LLVMFlang: Add a required line to define linking rules on Windows
This was missed in commit d34e5a98b8 (LLVMFlang: Add support for
Windows, 2022-09-18, v3.25.0-rc1~102^2).
2022-10-24 12:53:07 -04:00
Alex Turbov
3043c17039 Help: Add more CLI :option: references to various pages 2022-10-20 11:21:40 -04:00
Brad King
077e42fe76 Merge topic 'android-path-suffixes' into release-3.25
7e5b48a7b1 Android: Avoid searching API level directories matching architecture bitness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7805
2022-10-19 09:55:59 -04:00
Sergiu Deitsch
7e5b48a7b1 Android: Avoid searching API level directories matching architecture bitness
When cross-compiling for Android, the library path suffixes `/<number>/`
refer to API level specific platform libraries instead of architecture
bitness. Disable path suffix use under NDK to avoid incorrect inclusion
of API level specific libraries below the targeted API level.

Fixes: #23830
2022-10-18 14:21:51 -04:00
Brad King
dd32e58cae Merge topic 'FindJNI-android-api' into release-3.25
c833df0924 FindJNI: replace CMAKE_ANDROID_API by CMAKE_SYSTEM_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7801
2022-10-18 13:51:01 -04:00
Brad King
f688e4ff9f Merge topic 'serenityos-no-libdl' into release-3.25
4fa0d157bc SerenityOS: Unset CMAKE_DL_LIBS because LibDl no longer exists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7797
2022-10-18 13:47:07 -04:00
Sergiu Deitsch
c833df0924 FindJNI: replace CMAKE_ANDROID_API by CMAKE_SYSTEM_VERSION
In commit 00c4f488f2 (FindJNI: support Android NDK, 2022-03-18,
v3.24.0-rc1~325^2) we used `CMAKE_ANDROID_API` to check the Android API
level.  However, `CMAKE_SYSTEM_VERSION` is the authoritative value.

When cross-compiling for Android, an unset `CMAKE_ANDROID_API` can
result in failure to locate JNI because the `NativeHelper` component
cannot be found. In this case, the component is falsely assumed to be
available by default (and thus required) since the comparison against an
unset `CMAKE_ANDROID_API` variable evaluates to true.  Use
`CMAKE_SYSTEM_VERSION` to determine the Android API level instead.

Issue: #23830
2022-10-17 15:51:10 -04:00
Robert Maynard
d0e52219eb CUDA: Revert "Always mark cuda toolkit as system include"
We need to revert this change as it can disable error messages
when compiling invalid CUDA code.

This reverts commit ea659b155d (CUDA: Always mark cuda toolkit as system
include, 2022-06-27, v3.25.0-rc1~269^2).
2022-10-17 10:17:33 -04:00
Andrew Kaster
4fa0d157bc SerenityOS: Unset CMAKE_DL_LIBS because LibDl no longer exists
Serenity's LibDl was merged into LibC to simplify the build and port
infrastructure [1].  Set `CMAKE_DL_LIBS` to the empty string to match
what other platforms do.  Update the platform module added by
commit 45ca894164 (SerenityOS: Add Platform module, 2022-01-02,
v3.25.0-rc1~635^2).

[1] https://github.com/SerenityOS/serenity/pull/14854

Issue: #23589
2022-10-17 10:13:47 -04:00
leha-bot
a2fc4b6257 FindGLUT: Drop the now-unnecessary exclusion of pkg-config for multiconfig
Revert commit e0a62b84b5 (FindGLUT: On Windows and with multiple config
generator do not use pkg-config, 2022-09-27, v3.25.0-rc1~69^2). We now
call `select_library_configurations()` even after using pkg-config,
which will handle the absent libraries on Debug/Release configurations.

Issue: #24028
2022-10-13 10:06:57 -04:00
leha-bot
a60a33dcb0 FindGLUT: Drop the now-unnecessary ALLOW_SYSTEM_CFLAGS logic
Revert commit 8041ca5df0 (FindGLUT: Fix GLUT_INCLUDE_DIRS with
pkg-config and /usr/include, 2022-05-11, v3.24.0-rc1~151^2).
As the main code path will always do `find_path()` which respects the
`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE` variable and will search in system
paths depending on that variable.

Issue: #23474, #24028
2022-10-13 10:04:41 -04:00
leha-bot
4ad57224b5 FindGLUT: Use pkg-config's results as HINTS for normal search
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2), pkg-config results are used
directly.  However, this is not compatible with other features of
CMake's find logic such as `CMAKE_FIND_ROOT_PATH` and per-config
results.  Switch to a convention already used by pkg-config support in
other find modules, in which the pkg-config results are only used as
hints for the main search logic.

Fixes: #24028
2022-10-13 10:02:46 -04:00
Robert Maynard
eefba0fb02 FindCUDAToolkit: cuFile_rdma_static needs to link to cuFile_static 2022-10-12 13:26:05 -04:00