Commit Graph

12613 Commits

Author SHA1 Message Date
Michael Hirsch ca2877c039 FindPython: add support for Python 3.12 2022-05-12 10:55:11 -04:00
Michael Durso Jr b1c2cb0436 ExternalProject: Make SVN interactive with USES_TERMINAL_{DOWNLOAD,UPDATE}
ExternalProject_Add() supports USES_TERMINAL_* flags to enable user
input for different steps.  The Subversion download options ignored
these flags when checking out or updated a Subversion repo.

Fixes: #23348
2022-05-12 10:40:35 -04:00
Brad King c67f0cd592 Merge topic 'doc-package-compatibility-mode'
a82163839a CMakePackageConfigHelpers: Fix note about version files supporting ranges

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7254
2022-05-12 09:28:16 -04:00
friendlyanon a82163839a CMakePackageConfigHelpers: Fix note about version files supporting ranges
In commit 55c3b6a77e (CMakePackageConfigHelpers: Relax restrictions on
version range, 2019-05-30, v3.20.0-rc1~295^2~1) the documentation for
write_basic_package_version_file documented the support of version
ranges by the generated version files, however the note wrongly
specifies a COMPATIBILITY_MODE argument, instead of COMPATIBILITY.
2022-05-11 14:00:38 -04:00
Dmitry Kushpet 587d1942b5 FindOpenCL: Add support for version 3.0 2022-05-11 21:00:24 +03:00
Brad King 66aa34e529 Merge topic 'FindOpenSSL-qnx7.0'
e6656381aa FindOpenSSL: Support version 1.1.1 under QNX 7.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7232
2022-05-10 10:37:58 -04:00
Brad King 79b64690d9 Merge topic 'werror-property'
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !7187
2022-05-10 10:30:42 -04:00
Craig Scott 8aa29a1793 CMakeDetermineSystem: Remove unreachable code 2022-05-08 18:54:35 +10:00
Georg Lutz e6656381aa FindOpenSSL: Support version 1.1.1 under QNX 7.0
QNX 7.0 allows parallel installation of OpenSSL 1.0.2 and OpenSSL 1.1.1. The
1.1.1 version has "1_1" appended to the include dir and library names.
2022-05-06 22:07:07 +02:00
Martin Duffy 76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors
Add `COMPILE_WARNING_AS_ERROR` target property and supporting
`CMAKE_COMPILE_WARNING_AS_ERROR` variable.

`COMPILE_WARNING_AS_ERROR` is initialized by
`CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is
true, it expands to a different flag depending on the compiler such that
any warnings at compile will be treated as errors.

Supports compiler ids that I could find a relevant flag for.
2022-05-06 12:14:37 -04:00
Cameron Cawley 6a2b016bbd OpenWatcom: Support CMAKE_WATCOM_RUNTIME_LIBRARY with Linux and OS/2 builds 2022-05-06 10:40:59 -04:00
Cameron Cawley 33da5824ac OpenWatcom: Allow specifying the runtime library
Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the
runtime library selection.  Add policy CMP0136 to switch to
in place of the old hard-coded default flags.

Fixes: #23178
2022-05-06 10:40:58 -04:00
Brad King 78b7046a32 Merge topic 'Java-version-handling'
c80763c701 Merge branch 'backport-3.23-Java-version-handling' into Java-version-handling
93e18a4eb6 FindJava, FindJNI: ensure correct handling of versions on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7241
2022-05-06 08:57:25 -04:00
Brad King cc207014cf Merge topic 'Java-version-handling' into release-3.23
93e18a4eb6 FindJava, FindJNI: ensure correct handling of versions on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7241
2022-05-06 08:57:24 -04:00
Craig Scott c5dff5ace2 Merge topic 'FetchContent_find_package_integration'
29e31e2825 Packages: Integrate FetchContent and find_package()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !5688
2022-05-06 08:33:38 -04:00
Brad King cd20592c6d Merge topic 'ExternalProject-no-extract-timestamp'
a283e58b51 ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7137
2022-05-05 09:20:41 -04:00
Brad King f533b548ca Merge topic 'remove-PackageMaker-generator'
c150f89f4d CPack: Remove the deprecated PackageMaker generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7221
2022-05-05 09:17:35 -04:00
Marc Chevrier c80763c701 Merge branch 'backport-3.23-Java-version-handling' into Java-version-handling 2022-05-05 11:18:55 +02:00
Marc Chevrier 93e18a4eb6 FindJava, FindJNI: ensure correct handling of versions on Windows
* versions are sorted in correct order
* EXACT keyword is taken into account

Fixes: #23479
2022-05-05 11:14:52 +02:00
Kasper Laudrup a283e58b51 ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policy
Add the option to keep the current filestamps when extracting an
archive in ExternalProject_Add.

Enabling this option makes the behavior consistent with how
ExternalProject_Add is used when checking out code from revision
control instead of an archive.

Fixes: #22746
2022-05-05 09:01:54 +10:00
Craig Scott c150f89f4d CPack: Remove the deprecated PackageMaker generator
This CPack generator has been deprecated since commit 7bf187499f
(CPack: Deprecate PackageMaker generator, 2020-01-31).

Fixes: #23344
2022-05-05 08:36:44 +10:00
Brad King 2045e1eee0 Merge topic 'less_ptx_for_all_all-major_native'
e8591f1516 CUDA: native/all/all-major generates minimal set of ptx code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7216
2022-05-04 11:18:28 -04:00
Brad King 1784440bd0 Merge topic 'cpack-nsis-typos'
125f6964ba CPack/NSIS: Fix several typos in the NSIS template

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7227
2022-05-04 11:11:09 -04:00
Brad King 8aff3e41a8 Merge topic 'FindThreads-aix'
3257c34073 FindThreads: avoid failing in AIX when using -D_XOPEN_SOURCE=500

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7230
2022-05-04 11:08:38 -04:00
Brad King d47e466935 Merge topic 'FindPython-fix-typo-error'
fff8d5b212 FindPython: fix typo error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7233
2022-05-04 11:07:10 -04:00
Sadie Powell 125f6964ba CPack/NSIS: Fix several typos in the NSIS template 2022-05-03 12:47:27 -04:00
Carlo Marcelo Arenas Belón 3257c34073 FindThreads: avoid failing in AIX when using -D_XOPEN_SOURCE=500
Current FindThreads fails in AIX (tested on 7.1 and 7.2) when using
additional compilation flags (ex: -D_XOPEN_SOURCE=500) because the
linker might need additional flags to link and those aren't yet known
by the time check_include("pthread.h") is run (which is also the first
test).

Remove the check for it and all supporting code and rely instead on
the compilation test that will be done later to find the correct
syntax to use, and that confirms it exists implicitly.
2022-05-03 12:26:18 -04:00
Robert Maynard e8591f1516 CUDA: native/all/all-major generates minimal set of ptx code
Fixes #23459
2022-05-03 11:52:23 -04:00
Brad King 252fdfe6e4 Merge topic 'cuda-arch-verify'
7bf5200699 CUDA: Restore CMAKE_CUDA_ARCHITECTURES support for -real and -virtual suffixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewd-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7218
2022-05-03 11:26:40 -04:00
Marc Chevrier fff8d5b212 FindPython: fix typo error
Fixes: #23476
2022-05-03 10:46:13 +02:00
Craig Scott 29e31e2825 Packages: Integrate FetchContent and find_package()
Allow FetchContent_MakeAvailable() to try a call to
find_package() first, or redirect a find_package() call to
FetchContent_MakeAvailable(). The user can set variables
to control which of these are allowed or tried by default.

Fixes: #21687
2022-05-03 16:48:11 +10:00
Brad King 7bf5200699 CUDA: Restore CMAKE_CUDA_ARCHITECTURES support for -real and -virtual suffixes
Fix the validation regex added by commit c267ed205a (CUDA: Defer
architecture testing to the compiler testing step, 2022-04-25) to
allow these values.
2022-04-29 09:07:53 -04:00
Brad King d71d555153 Merge topic 'findmpi_dont_variable_lang'
c9c2e040aa FindMPI: Don't check for variables named the same as the languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7208
2022-04-28 09:37:23 -04:00
Brad King d35f1c9bee Merge topic 'cuda-arch-verify'
c267ed205a CUDA: Defer architecture testing to the compiler testing step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7202
2022-04-28 09:36:31 -04:00
Brad King 4b63f2ca4a Merge topic 'FindThreads-cleanup'
c53748a377 FindThreads: Factor out helper macro for libc check
564385194b FindThreads: Avoid repeating check for -pthread flag
41ef904e81 FindThreads: Simplify conditions for not-in-libc checks
cbe7550d99 FindThreads: Remove unnecessary condition
1ee8c545dd FindThreads: Clarify internal helper macro names
5b5cd92363 FindThreads: Drop strange SunOS+pthread.h+thr_create combination
c9bd462c08 FindThreads: Drop unused internal CMAKE_HAVE_THREADS_LIBRARY variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !7207
2022-04-27 08:53:18 -04:00
Brad King 54f7955382 Merge topic 'CUDAToolkit-cupti-include-dirs'
e6b51a1b01 CUDAToolkit: Add include paths for CUDA::cupti

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !7200
2022-04-27 08:50:07 -04:00
Brad King 967a1037b2 Merge topic 'FindBoost-1.79'
f90fb73651 FindBoost: Add support for Boost 1.79

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7205
2022-04-27 08:43:49 -04:00
Robert Maynard c9c2e040aa FindMPI: Don't check for variables named the same as the languages
We want to see if a language is inside `MPI_FIND_COMPONENTS` not if
the variables `C`/`CXX` is set to a positive value.
2022-04-26 16:16:31 -04:00
Brad King c53748a377 FindThreads: Factor out helper macro for libc check 2022-04-26 13:54:53 -04:00
Brad King 564385194b FindThreads: Avoid repeating check for -pthread flag
When `THREADS_PREFER_PTHREAD_FLAG` is enabled, we check for it before
the thread libraries.  We do not need to check after them too.
2022-04-26 13:54:53 -04:00
Brad King 41ef904e81 FindThreads: Simplify conditions for not-in-libc checks
If `CMAKE_HAVE_LIBC_PTHREAD` is true, we also set `Threads_FOUND` to
true, which blocks all the other checks from running.
2022-04-26 13:54:53 -04:00
Brad King cbe7550d99 FindThreads: Remove unnecessary condition
The `THREADS_HAVE_PTHREAD_ARG` cache entry cannot be defined unless
FindThreads has already been executed, perhaps by a previous run of
CMake, or a previous `find_package(Threads)` call.  In that case, the
other alternatives will also already have been checked and results
cached.
2022-04-26 13:54:53 -04:00
Brad King 1ee8c545dd FindThreads: Clarify internal helper macro names 2022-04-26 13:54:53 -04:00
Brad King 5b5cd92363 FindThreads: Drop strange SunOS+pthread.h+thr_create combination
Solaris has provided pthreads for a long time, so we probably never
get to this combination anyway.
2022-04-26 13:54:53 -04:00
Brad King c9bd462c08 FindThreads: Drop unused internal CMAKE_HAVE_THREADS_LIBRARY variable
This internal variable has not been used since commit 46368eddfd
(FindThreads: move checking of the -pthread compiler flag into a macro,
2014-10-06, v3.1.0-rc1~21^2~2).  It has never been documented for public
use.
2022-04-26 13:54:53 -04:00
Peter Bell e6b51a1b01 CUDAToolkit: Add include paths for CUDA::cupti
CUDA's cupti library has its headers in a seperate directory on a
standard CUDA install, but `CUDA::cupti` only adds the default cuda
include directory.

Issue: #22761
2022-04-26 13:48:02 -04:00
Brad King f90fb73651 FindBoost: Add support for Boost 1.79
Update the list of known versions.

Run the command

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

to extract dependencies from the 1.79.0 source tree.
They are the same as 1.78's dependencies, so just update
the version check for warning about newer versions.

Fixes: #23452
2022-04-26 11:23:16 -04:00
Brad King c267ed205a CUDA: Defer architecture testing to the compiler testing step
Verifying the architectures during compiler identification is redundant,
and requires a lot more up-front information than we should need.
It also causes unsupported architectures to break the compiler id and
version detection, so the resulting output from CMake does not report
the compiler version, which is useful information to know why the
specified architectures are not supported.

The "detecting compiler ABI info" and "check for working compiler" steps
already pass `CMAKE_CUDA_ARCHITECTURES` into their test projects.
Therefore we can just drop the earlier architecture testing.  Bad
architectures will be reported as a not-working compiler, and the
output will include the compiler's error message.

This reverts the approach from:

* commit 19cc5bc296 (CUDA: Throw error if user-specified architectures
                     don't work, 2020-05-26, v3.18.0-rc1~79^2)
* commit 650c1029a0 (CUDA: Detect non-working user-specified architectures
                     on NVCC, 2020-05-28, v3.18.0-rc1~51^2)
* commit 01428c5560 (CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES
                     doesn't work during detection,
                     2020-08-29, v3.19.0-rc1~241^2).

Their goal was in part to avoid waiting until the test for working
compiler to detect unsupported architectures.  However, experience has
shown that failing earlier is more trouble than it's worth.

Fixes: #23161
Issue: #20756
2022-04-25 15:01:36 -04:00
Brad King b48e348b66 Merge topic 'FindICU-show-found-libs'
c3c7e6d609 FindICU: Show location of found libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7193
2022-04-22 09:11:42 -04:00
Brad King bd8acc3a1b Merge topic 'clang-cl-asm-msvc-runtime'
b41fab9285 Clang: populate MSVC runtime library abstraction table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7048
2022-04-22 09:01:35 -04:00