Commit Graph

10699 Commits

Author SHA1 Message Date
Marc Chevrier
6fdfe2428d FindPython: enhance ABI checks against include directory
Fixes: #21149
2020-09-02 15:41:16 +02:00
Marc Chevrier
d264685bee UseSWIG: Update option -interface usage
Option -interface must not be used if multiple SWIG files are part
of the same library.

Fixes: #21134
2020-08-31 12:33:57 +02:00
Brad King
807aaae4ac Merge topic 'FindJNI-arm64' into release-3.18
44dffbcc94 FindJNI: Add arm64 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5162
2020-08-26 10:26:52 -04:00
Brad King
57c1be6e15 Merge topic 'cuda-std-for-msvc' into release-3.18
bed315a0da CUDA: Support setting CUDA14/17 when using MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5160
2020-08-26 10:25:44 -04:00
Malcolm Parsons
44dffbcc94 FindJNI: Add arm64 support
On 64-bit ARM, JVM directories have an arm64 suffix.
2020-08-25 14:34:02 -04:00
Robert Maynard
bed315a0da CUDA: Support setting CUDA14/17 when using MSVC
Fixes #20953
2020-08-24 09:53:38 -04:00
Raul Tambre
95bc11dbb4 MSVC: Record support for c_static_assert
Supported since MSVC 19.28.29115 (VS 16.8.0 Preview 1.0).
2020-08-20 09:45:47 -04:00
Brad King
4fc1dd2ff1 Merge topic 'FindMPI-cuda-pthread' into release-3.18
47abe5f225 FindMPI: Fix regression in pthread guard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5147
2020-08-20 07:55:23 -04:00
Axel Huebl
47abe5f225 FindMPI: Fix regression in pthread guard
Fix a regression with MPI and CUDA<10.2 that did let `-pthread` flags
slip to nvcc again.  In commit b725a19072 (FindMPI: Deny -fexceptions
from NVCC, 2020-07-02, v3.18.0-rc4~12^2) we accidentally forgot to use
the variable containing the replacement result.

Fixes: #21108
2020-08-20 06:52:45 -04:00
Brad King
281a87f834 Merge topic 'ep-patch-skip-update-dep' into release-3.18
715324742f ExternalProject: Stop configure target from always appearing out-of-date
c0b7198ad9 ExternalProject: Stop patch target from always appearing out-of-date

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5136
2020-08-19 11:40:02 -04:00
Brad King
833e84ca1c Merge topic 'llvm-rc-quote-cmake' into release-3.18
3937536d16 llvm-rc: Fix quoting of path to cmake in CMAKE_RC_COMPILE_OBJECT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5139
2020-08-19 11:37:54 -04:00
Brad King
e9d0059bb3 Merge topic 'FindPython-enhance-version-extraction-from-lib-name' into release-3.18
72822e26c9 FindPython: enhance robustness of version extraction from library name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5135
2020-08-19 11:36:51 -04:00
Thomas Bernard
3937536d16 llvm-rc: Fix quoting of path to cmake in CMAKE_RC_COMPILE_OBJECT
When the installation path to cmake includes spaces, the
`<CMAKE_COMMAND>` is required to have proper quotation of the cmake
call.

Fixes: #21095
2020-08-18 17:15:34 -04:00
Robert Maynard
6896e50967 CMakeFindBinUtils: Always consider plain binutils when not cross-compiling
Since commit c5dd2ca538 (DetermineCompiler: Relax
_CMAKE_TOOLCHAIN_PREFIX detection, 2020-03-25, v3.18.0-rc1~430^2),
`_CMAKE_TOOLCHAIN_PREFIX` may be set even when not cross-compiling.
In this case we may still need to use binutils without any prefix.

Fixes: #21103
2020-08-18 13:19:24 -04:00
Craig Scott
715324742f ExternalProject: Stop configure target from always appearing out-of-date
When updates are disconnected, don't depend on skip-update because that
target is always considered out of date. Depend directly on the patch target
instead because it already depends on the appropriate target regardless of
whether updates are disconnected or not. This in turn means nothing depends
on the skip-update target, so it has also been removed.

Relates: #21086
2020-08-18 23:27:47 +10:00
Craig Scott
c0b7198ad9 ExternalProject: Stop patch target from always appearing out-of-date
The skip-update target is always considered out-of-date. The change in
7249ba9677 (ExternalProject: Enforce that patch depends on update, 2020-04-03)
made the patch target depend on skip-update, which in turn made it
always out of date too. The patch command should only be re-run if the download
needs to be performed again where updates are disconnected.

Fixes: #21086
2020-08-18 23:21:36 +10:00
Marc Chevrier
72822e26c9 FindPython: enhance robustness of version extraction from library name
Fixes: #21105
2020-08-18 12:30:47 +02:00
Daniele E. Domenichelli
e7fe0b24c4 FindRuby: Add documentation for deprecated variables
Since commit e672db628b (FindRuby: Rename variables to match case of
module name, 2020-03-11, v3.18.0-rc1~546^2), the upper-case-prefixed
variable names are for compatibility only but still exist.  Put them
back in the documentation.

Issue: #21064
2020-08-12 11:25:45 -04:00
Brad King
eaf81817c4 Merge topic 'msvc_c11' into release-3.18
f7347f28c7 MSVC: Record support for C11 and c_restrict

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5115
2020-08-12 11:14:51 -04:00
Brad King
0ca6d5766b Merge topic 'FindPython-manage-SOABI-in-all-versions' into release-3.18
951640f1f9 FindPython: manage SOABI for all Python versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5119
2020-08-12 11:13:16 -04:00
Raul Tambre
f7347f28c7 MSVC: Record support for C11 and c_restrict
MSVC >=19.27 supports a C11 switch.
The `c_restrict` feature has also been implemented.

Fixes: #21069
2020-08-11 09:08:21 -04:00
Brad King
9ccd13d8cd Merge topic 'findhdf5-fix-nohl' into release-3.18
e038107ee7 FindHDF5: fix compiler detection when HL is disabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5112
2020-08-11 08:55:45 -04:00
Brad King
e524819483 Merge topic 'automoc-path-prefix-off' into release-3.18
5b5be34811 Help: Add 3.18.2 release note about AUTOMOC_PATH_PREFIX default change
db659e18bc Merge branch 'backport-3.17-automoc-path-prefix-off'
e503fbe38a Merge branch 'backport-3.16-automoc-path-prefix-off'
4c33b305a0 Autogen: Turn off moc path prefix generation by default
56510b7d85 Merge branch 'backport-test-FindPkgConfig-isolate-env' into release-3.17
effc9a1032 Merge branch 'backport-3.17-automoc_timestamp_deps' into release-3.17
507fecd7e2 Merge branch 'ninja-multi-rsp-remove-path' into release-3.17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5105
2020-08-11 08:51:01 -04:00
Marc Chevrier
951640f1f9 FindPython: manage SOABI for all Python versions
Fixes: #21070
2020-08-11 10:16:40 +02:00
Seth R Johnson
e038107ee7 FindHDF5: fix compiler detection when HL is disabled
A valid HDF5 installation with the "high level" extensions not
configured will *fail* to be correctly detected by CMake since
commit d9e39f3f89 (FindHDF5: check that compiler wrapper can
compile a minimal program, 2020-02-10, v3.18.0-rc1~744^2~1):

```
/.../hdf5/cmake_hdf5_test.c:2:10: fatal error: 'hdf5_hl.h' file not found
```

This does not stop the configuration but does prevent flags and
libraries from being recognized.
2020-08-10 11:53:58 -04:00
Brad King
b8214a87bf Merge topic 'FPHSA-name-mismatches-chained-via-include' into release-3.18
98844ec9db FPHSA: detect inclusion between find modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Logan Barnes <barneslt63@gmail.com>
Merge-request: !5107
2020-08-10 11:25:09 -04:00
Brad King
cb1f2cf093 Merge topic 'FindRuby-restore-include-path' into release-3.18
6959744131 FindRuby: Restore compatibility variable RUBY_INCLUDE_PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5109
2020-08-10 11:21:20 -04:00
Brad King
b88fb7eec6 Merge topic 'FindPython-user-policies' into release-3.18
a92d384548 FindPython: ensure user's policies are respected

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Henry Schreiner <henryschreineriii@gmail.com>
Merge-request: !5098
2020-08-10 11:19:17 -04:00
Brad King
db659e18bc Merge branch 'backport-3.17-automoc-path-prefix-off' 2020-08-10 10:49:18 -04:00
Brad King
e503fbe38a Merge branch 'backport-3.16-automoc-path-prefix-off' 2020-08-10 10:41:06 -04:00
Joerg Bornemann
4c33b305a0 Autogen: Turn off moc path prefix generation by default
Change the default value of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF` to
restore compatibility with behavior of CMake 3.15 and below.

C++ source files that are generated by Qt's meta object compiler (moc)
include the header file that was passed as input argument to moc. This
is usually a path relative to the source directory, for example

    #include "../../source/dir/myobject.h"

That is problematic for reproducible builds as described in #18815.
To cope with that, the target property AUTOMOC_PATH_PREFIX was
introduced in CMake 3.16 by commit d018d27c10 (Autogen: Add moc path
prefix generation (AUTOMOC_PATH_PREFIX), 2019-09-13, v3.16.0-rc1~94^2~4).
The property is default-initialized from the variable
`CMAKE_AUTOMOC_PATH_PREFIX`, which defaults to `ON`.

If this property is ON, and myobject.h is located in an include
directory of the target, moc-generated C++ files include the file
without the "path prefix":

    #include "myobject.h"

This behavior, however, can break projects that have equally named
header files in different include directories.  As "not breaking
existing projects" trumps "have reproducible builds by default" we
change the default of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF`.

Also, it is now possible to pass `-DCMAKE_AUTOMOC_PATH_PREFIX=ON` on the
CMake command line.  Before, it was overridden in `CMakeGenericSystem`.

Fixes: #20598
Issue: #18815
2020-08-10 10:36:17 -04:00
Brad King
6959744131 FindRuby: Restore compatibility variable RUBY_INCLUDE_PATH
Since commit e672db628b (FindRuby: Rename variables to match case of
module name, 2020-03-11, v3.18.0-rc1~546^2), the result variables named
with the old `RUBY_` prefix are provided by compatibility code that maps
from the new `Ruby_` prefix variables.  There is no `Ruby_INCLUDE_PATH`
variable, so do not try to map it to `RUBY_INCLUDE_PATH`.  The latter is
provided by dedicated compatibility code left from before that
transition.

Fixes: #21064
2020-08-07 12:40:26 -04:00
Ben Boeckel
98844ec9db FPHSA: detect inclusion between find modules
Various find modules include each other to delegate finding some subset
or variant of the package. Ideally, these would use `find_dependency` or
some other actual `find_package` mechanism, but that is a larger change.
Instead, just detect inclusion and suppress FPHSA name mismatch
warnings.

Fixes: #21060
2020-08-07 09:41:38 -04:00
Marc Chevrier
a92d384548 FindPython: ensure user's policies are respected
Do not set the policy version before recording our internal macros such
as `__Python_add_library`.  Otherwise callers get our policy version
instead of theirs.  Instead just set the specific policies we need.

Also fix one case in our test suite where we were accidentally
relying on the policy version to be set by `FindPython`.

Fixes: #21042
2020-08-07 09:24:18 -04:00
Laurits Riple
8829d2caba GoogleTest: Restore support for list arguments in TEST_EXECUTOR
Refactoring in commit 889a7146ff (GoogleTestAddTests: Refactor into
callable method, 2020-03-16, v3.18.0-rc1~450^2~3) accidentally
parsed `TEST_EXECUTOR` as a single-value argument instead of a list.
2020-08-03 12:10:58 -04:00
Brad King
533a6256a3 Merge topic 'clang-msvc-cxx-std' into release-3.18
21e497fe63 Clang: Fix fallback compile features when simulating old MSVC versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5082
2020-07-30 08:39:58 -04:00
Brad King
21e497fe63 Clang: Fix fallback compile features when simulating old MSVC versions
Refactoring in commit 25439c7d62 (Clang: Refactor CXX standard flags
into __compiler_clang_cxx_standards(), 2020-03-16, v3.18.0-rc1~362^2~4)
accidentally broke the `cxx_std_*` fallback feature names.

Issue: #21033
2020-07-29 13:02:21 -04:00
Mike Gelfand
0faedae335 FindCURL: Fix list index check after search
Fix logic added by commit fc5afbe970 (FindCURL: support COMPONENTS to
check features, 2018-11-28, v3.14.0-rc1~287^2~2).

When searching for particular components and `curl-config` reports one of
the components being searched for first in the list, `find_package` fails.
This is due to the check that treats non-zero index in the list as success
and zero index as failure, while documentation on `list(FIND)` states that
failure to find an element results in return value of -1 (not 0). I'm
hitting this when building cURL with support for HTTP and HTTPS protocols
only, and then trying to `find_package(CURL COMPONENTS HTTP HTTPS)`.

I'm using `if(NOT x EQUAL -1)` check form as it appears to be the most used
throughout the modules.

While fixing this issue I've looked through all the uses of `list(FIND)` in
other modules but wasn't able to find improper use except here.
2020-07-28 09:09:43 -04:00
Brad King
e67d9c6e31 Compilers: Ignore -print-sysroot prefix when it is '/'
Since commit 8cc384f629 (Compilers: Add paths from -print-sysroot to
system prefix path, 2020-03-25, v3.18.0-rc1~337^2) we prepend the
compiler's sysroot to `CMAKE_SYSTEM_PREFIX_PATH`.  This does not
make sense when the prefix is just `/`, such as on Ubuntu 16.04's
system compiler.

Fixes: #21019
2020-07-27 10:53:43 -04:00
Brad King
90c88302b5 Merge topic 'externalproject-download-git-2.20-fix' into release-3.18
8dbefc3ca6 ExternalProject: omit --no-checkout from git clone when using git 2.20.x.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5054
2020-07-27 10:46:35 -04:00
Brad King
fadedcbb72 Merge topic 'FindXalanC-1.12' into release-3.18
4bf102418b FindXalanC: Fix version parsing for XalanC 1.12

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5056
2020-07-27 10:43:54 -04:00
Nate Avers
8dbefc3ca6 ExternalProject: omit --no-checkout from git clone when using git 2.20.x.
The optimization from commit 627fc5b44f (ExternalProject: Avoid
unnecessary checkout on clone, 2019-07-29, v3.16.0-rc1~325^2) triggers a
bug in the Git 2.20.x series that is not in older or newer versions.
Drop the optimization for that specific range of Git versions.

Fixes: #21009
2020-07-24 09:39:06 -04:00
Brad King
4bf102418b FindXalanC: Fix version parsing for XalanC 1.12
The version header now puts parentheses around the components.

Fixes: #21010
2020-07-24 07:23:19 -04:00
Brad King
26673bf480 Xcode: Explicitly specify default native architecture on macOS
When `CMAKE_OSX_ARCHITECTURES` is not specified, we add the Xcode
setting `ONLY_ACTIVE_ARCH = YES` with the intention of targeting the
native architecture of the host.  However, the default `ARCHS` value
chosen by "Xcode 12 Universal Apps" includes multiple architectures.
Add an explicit `ARCHS` setting with value `$(NATIVE_ARCH_ACTUAL)`
to tell Xcode to use the host's native architecture only.

Fixes: #20893
2020-07-20 10:03:15 -04:00
Raul Tambre
ff086f066b NVCC: Handle host compiler with spaces in path
Need to surround it with quotes otherwise the different bits are passed as
separate arguments.

Fixes #20954.
2020-07-14 22:27:58 +03:00
Brad King
d8cdec066a Merge topic 'irsl-intel-ia32' into release-3.18
f332ce12d6 IRSL: Fix path to Intel 32-bit redist libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4995
2020-07-10 06:43:58 -04:00
Brad King
2e290682b8 Merge topic 'FindOpenMP-version' into release-3.18
656d6ea821 FindOpenMP: Set version variables every time CMake runs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4996
2020-07-10 06:42:43 -04:00
Brad King
8e71d199dc Merge topic 'FindJava-no-macos-stub' into release-3.18
e8051b1f20 FindJava: Update check to avoid accepting macOS stub 'java' as Java

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4993
2020-07-09 06:49:21 -04:00
Brad King
e69c64a144 Merge topic 'cuda-11-ptx-arch' into release-3.18
8707178c1c FindCUDA/select_compute_arch: generate PTX for the latest architecture

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4991
2020-07-09 06:47:42 -04:00
Brad King
6ce96dfbc7 Merge topic 'doc-CPack-source-package' into release-3.18
f8b7acaf90 Help: Fix CPack module docs on config file for source package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4985
2020-07-09 06:46:41 -04:00