Commit Graph

12877 Commits

Author SHA1 Message Date
Craig Scott 6b6d593351 ExternalProject: Use -S and -B args to robustly set configure dirs
Previously, the build directory was not explicitly specified. Instead, the
current working directory was assumed to be the build directory and the
source directory was passed as a positional argument. However, if the
source directory contained a CMakeCache.txt, it was treated as a binary
directory instead. For the scenario where a project is built in-source and
it calls ExternalProject_Add() with its own source directory but a different
build directory (e.g. to build itself with a different set of configure arguments),
this results in a build error.

Explicitly list both the source and build directories using the -S and -B options
respectively. This unambiguously sets both, avoiding the above problem.

Fixes: #24081
2022-10-27 18:44:01 +11:00
Brad King ed8b07fd5c Merge topic 'nsis-licence-bom'
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:30 -04:00
Brad King 1621c707e7 Merge topic 'flang-windows'
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:20 -04:00
Brad King 765d8eda88 Merge topic 'CheckSourceCompiles-Swift'
3fc971c38b CheckSourceCompiles: For Swift executable, name source 'main.swift'
2345139ab5 CheckSourceCompiles: Add support for Swift
4451a1f54f Tests: Factor out a CMake_TEST_Swift variable for Swift test conditions
f78ad6223a Tests: Provide Apple inspection results to CMakeOnly and RunCMake tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Saleem Abdulrasool <compnerd@compnerd.org>
Merge-request: !7783
2022-10-25 10:29:36 -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
Evan Wilde 3fc971c38b CheckSourceCompiles: For Swift executable, name source 'main.swift'
Xcode uses its own heuristics to determine whether or not to accept
top-level code in a source file while Ninja uses the swift driver
heuristics.

With the Swift driver, if the module contains a single file, that file
will be parsed as a top-level code context. With Xcode, the single file
will only be parsed as top-level code if the name of that file is
'main.swift'.

To ensure more consistent behavior between the two generators, if we're
building Swift and the try-compile target type is executable or
undefined, we name the file `main.swift` to ensure that both will handle
the single file as top-level code.
2022-10-24 12:39:21 -04:00
Evan Wilde 2345139ab5 CheckSourceCompiles: Add support for Swift
Plumb through swift `check_source_compiles` support.  Add tests to check
that valid swift sources compile and invalid sources don't.
2022-10-24 12:39:21 -04:00
Brad King a0523f81d1 Merge topic 'doc-cli-xrefs'
3043c17039 Help: Add more CLI `:option:` references to various pages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7811
2022-10-21 10:19:54 -04:00
Alex Turbov 3043c17039 Help: Add more CLI :option: references to various pages 2022-10-20 11:21:40 -04:00
Brad King a6eec22923 Merge topic 'android-path-suffixes'
7e5b48a7b1 Android: Avoid searching API level directories matching architecture bitness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7805
2022-10-19 09:56:01 -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 8b6693720f Merge topic 'FindJNI-android-api'
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:02 -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 f1478a1d92 Merge topic 'serenityos-no-libdl'
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:08 -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
Brad King b3cf2da514 Merge topic 'revert_nvcc_marking_include_as_system'
d0e52219eb CUDA: Revert "Always mark cuda toolkit as system include"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7798
2022-10-18 13:45:57 -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
Brad King 37fc2176dd Merge topic 'UseSWIG-perl5-language'
989b469f1c UseSWIG: Add support of perl5 language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7794
2022-10-17 10:08:37 -04:00
Brad King 6e89585d95 Merge topic 'swift-default-flags'
238e0f25b2 Xcode: Set WMO on non-debug build configurations
6063428de7 Swift: Update default build flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7741
2022-10-17 10:05:04 -04:00
Marc Chevrier 989b469f1c UseSWIG: Add support of perl5 language 2022-10-14 16:46:42 +02:00
Brad King 83663325f6 Merge topic 'FindZLIB-no-components'
cf612440dc FindZLIB: Fail if components are requested as it does not provide any

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7767
2022-10-14 09:08:31 -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
koostosh cf612440dc FindZLIB: Fail if components are requested as it does not provide any
Fixes: #18872
2022-10-12 15:08:14 -04:00
Robert Maynard eefba0fb02 FindCUDAToolkit: cuFile_rdma_static needs to link to cuFile_static 2022-10-12 13:26:05 -04:00
Brad King 2f2cdb0780 Merge topic 'GoogleTest-TYPED_TEST_P' into release-3.25
1d340d7cb2 GoogleTest: Add gtest-filter for TYPED_TEST_P

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7778
2022-10-12 09:25:35 -04:00
Brad King 9adb3fb733 Merge topic 'add_nvptx_compiler_to_findCUDAToolkit' into release-3.25
01cfd0163d FindCUDAToolkit: Add support for the nvptx compiler library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7779
2022-10-12 09:22:11 -04:00
Brad King 9615bebe37 Merge topic 'add_cufile_to_findCUDAToolkit' into release-3.25
ce6de038d9 FindCUDAToolkit: Add support for the cuFile library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7763
2022-10-12 09:20:59 -04:00
Brad King f3bb1c8d7f Merge topic 'flang-implicit-link-info' into release-3.25
0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7781
2022-10-12 09:17:47 -04:00
Brad King 0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran
Parse implicit link information for this compiler to support
mixed-language linking.  This was missed by commit 85749766df
(LLVMFlang: Add support for LLVM Flang, 2021-07-07, v3.24.0-rc1~86^2).
Also activate mixed-language test cases that would have caught this.

Issue: #22387
2022-10-11 15:38:48 -04:00
Evan Wilde 6063428de7 Swift: Update default build flags
Fully-optimized builds should be using whole-module optimizations(WMO)
to get all the optimizations the compiler can do for a given module.
As such, it makes sense for the release builds to pass
`-whole-module-optimization` or `-wmo` to the compiler by default.
`-whole-module-optimization` and `-wmo` are aliased and have the same
impact on the build.

Removing `-incrementa' from the `CMAKE_Swift_CREATE_*` variable:
WMO is incompatible with incremental builds, so it is removed to avoid
warnings from the Swift compiler.

Pass `-num-threads` to the driver in `CMAKE_Swift_CREATE_*`:
WMO doesn't use the `-j` flag, but instead uses `-num-threads` to get
parallelism. The two flags are applied in mutually exclusive contexts,
so `-j N` is a no-op in WMO, while `-num-threads` is a no-op in other
modes. Passing both at the same time will catch both cases without
negatively impacting the other case.
2022-10-11 11:55:45 -07:00
Brad King cfd149387e Merge topic 'doc-3.25-relnotes'
286a40cb5b Help: Update Sphinx versionadded directives for 3.25 release
f93f97d6c2 Help: Organize and revise 3.25 release notes
c174ef23f4 Help: Consolidate 3.25 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7751
2022-10-11 11:10:56 -04:00
Robert Maynard 01cfd0163d FindCUDAToolkit: Add support for the nvptx compiler library
Fixes #23892
2022-10-11 10:35:50 -04:00
Oleksii Odynochenko 1d340d7cb2 GoogleTest: Add gtest-filter for TYPED_TEST_P 2022-10-11 10:20:23 -04:00
Brad King 65554ead15 Merge topic 'ifw-missing-patch-releases'
de6764126a CPackIFW: Add support for missing QtIFW patch and minor releases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7765
2022-10-11 10:07:41 -04:00
Brad King bfe2f13557 Merge topic 'hip_windows_platform_module'
5b87ae6e2d HIP, Windows: Add Windows-Clang-HIP platform module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7773
2022-10-11 10:06:27 -04:00
Brad King c5cb85e42f Merge topic 'required_hip_lang_package'
22051103b8 HIP: Find hip-lang-config.cmake with REQUIRED

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7771
2022-10-11 10:05:40 -04:00
Brad King 01768850b8 Merge topic 'hip_use_cmake_path'
6021fa7928 HIP: Convert clang output to cmake style paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7772
2022-10-11 10:04:48 -04:00
Brad King eec8a7b681 Merge branch 'cpack-nsis-uninstaller' into release-3.24
Merge-request: !7774
2022-10-11 09:49:50 -04:00
Brad King e32b49e4de Merge topic 'cpack-nsis-uninstaller'
8721658959 CPack/NSIS: Fix installer not waiting for uninstaller to finish

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7774
2022-10-11 09:48:37 -04:00
Robert Maynard ce6de038d9 FindCUDAToolkit: Add support for the cuFile library 2022-10-11 09:27:26 -04:00
Mika Fischer 8721658959 CPack/NSIS: Fix installer not waiting for uninstaller to finish
In commit b795c96727 (CPack/NSIS: Fix uninstall command when run from
installer, 2022-03-21, v3.23.0-rc5~9^2~1) we incorrectly removed the
`_?` parameter when calling the uninstaller during installation.
This parameter is however essential for ExecWait to actually wait for
the uninstaller to finish.  Without it, the uninstaller is started in
the background and installer and uninstaller run at the same time.

See https://nsis.sourceforge.io/Docs/Chapter3.html#installerusageuninstaller

Add back the `_?` parameter to fix this regression.  Use another
approach to solve the problem motivating the original change.

Fixes: #24041
2022-10-10 10:41:45 -04:00
Brad King eb59397ef8 Merge topic 'add_cuda_11.8_new_archs'
7f4cbf6594 CUDA: Add support for the two new architectures in 11.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7761
2022-10-10 09:50:52 -04:00
Brad King db53376b1f Merge topic 'add_cuda_11.8_new_archs' into release-3.24
7f4cbf6594 CUDA: Add support for the two new architectures in 11.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7761
2022-10-10 09:50:51 -04:00
Brad King eebbe36ae6 Merge topic 'Intel-Fortran-warn-errors'
13f3382b1c Intel/IntelLLVM: Fortran has distinct "-Werror"-like flag
ab8a0a106e COMPILE_WARNING_AS_ERROR: Fix internal formatting of options table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7758
2022-10-10 09:49:46 -04:00