Commit Graph

10824 Commits

Author SHA1 Message Date
Brad King
44fac4a34e Merge topic 'findhdf5-targets'
5eff274017 FindHDF5: Remove VTK library type detection
a8e0a6b3e4 FindHDF5: Port changes from VTK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5129
2020-08-18 10:27:29 -04:00
Brad King
c873bb0a14 Merge topic 'FindX11-xcb-util-xfixes'
6d231b494f FindX11: Add xcb_util and xcb_xfixes libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5116
2020-08-17 14:54:22 -04:00
Brad King
3313bf06eb Merge topic 'ios-combined-prune-archs'
5852b8867f CMakeIOSInstallCombined: Enforce disjoint architecture sets
79098d23eb Tests: Avoid warnings about unused arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5111
2020-08-17 14:52:08 -04:00
Seth R Johnson
5eff274017 FindHDF5: Remove VTK library type detection 2020-08-14 12:03:21 -04:00
Ben Boeckel
a8e0a6b3e4 FindHDF5: Port changes from VTK 2020-08-14 11:57:59 -04:00
Kyle Edwards
7278ab262e Merge topic 'FindOpenSSL-static'
1925f9d8eb FindOpenSSL: Add support for finding static libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5124
2020-08-14 10:09:10 -04:00
Sylvain Corlay
1925f9d8eb FindOpenSSL: Add support for finding static libraries
Fixes: #20903
2020-08-13 17:59:13 +02:00
Brad King
e3fcb49d93 Merge topic 'FindRuby_document_deprecated_variables'
e7fe0b24c4 FindRuby: Add documentation for deprecated variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5120
2020-08-12 12:22:46 -04: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
b3196fe864 Merge topic 'msvc_c11'
f7347f28c7 MSVC: Record support for C11 and c_restrict

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5115
2020-08-12 11:14:52 -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
Brad King
0603eb00f9 Merge topic 'FindPython-manage-SOABI-in-all-versions'
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
Tim Blechmann
6d231b494f FindX11: Add xcb_util and xcb_xfixes libraries 2020-08-12 14:01:01 +08: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
0cd3b5d0ca Merge topic 'findlapack-quiet'
c156704ff0 FindLAPACK: Use find_package_handle_standard_args

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5110
2020-08-11 08:57:54 -04:00
Brad King
b995e2db38 Merge topic 'findhdf5-fix-nohl'
e038107ee7 FindHDF5: fix compiler detection when HL is disabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5112
2020-08-11 08:55:46 -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
121c3717ee Merge topic 'automoc-path-prefix-off'
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

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5105
2020-08-11 08:51:02 -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
0953c0051e Merge topic 'clang-cl-vfs'
20ebaed972 Clang: Add support for passing VFS arguments
d993ebd4ca clang-cl: Add '--' before source file
a94672b919 cmake: Change cmake_llvm_rc separator from -- to ++ to avoid conflict

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5087
2020-08-10 11:33:19 -04:00
Brad King
69d26f1502 Merge topic 'FPHSA-name-mismatches-chained-via-include'
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:10 -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
d8e242a779 Merge topic 'FindRuby-restore-include-path'
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
97717d4f37 Merge topic 'FindPython-user-policies'
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:18 -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
Gregor Jasny
5852b8867f CMakeIOSInstallCombined: Enforce disjoint architecture sets
Starting with Xcode 12 the arm64 architecture is supported
as an iOS device as well as simulator architecture.

But the fat macho file format does not distinguish by SDK,
only by architecture. That makes lipo (rightfully) complain
that it cannot add both architectures to a single file.

To work around we make sure that both SDKs are built for a
disjoint set of architectures. If an architecture is present
for both SDKs we prefer the currently configured one.

The log output has been extended to reflect that:

```
[iOS combined] Architectures (iphoneos): arm64 arm64e armv7 armv7s
[iOS combined] Architectures (iphonesimulator): arm64 arm64e i386 x86_64
[iOS combined] Architectures (iphonesimulator) after pruning: i386 x86_64
```
2020-08-08 15:22:12 +02:00
Seth R Johnson
c156704ff0 FindLAPACK: Use find_package_handle_standard_args
LAPACK previously used custom and verbose output messages.
2020-08-07 13:08:30 -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
Thomas Bernard
d993ebd4ca clang-cl: Add '--' before source file
On Linux and macOS, absolute paths start with `/` which may be
interpreted by clang-cl as an option.  To avoid this, we separate the
source file path from preceding options with `--` to tell `clang-cl` it
is not an option.
2020-08-07 11:48:48 -04:00
Thomas Bernard
a94672b919 cmake: Change cmake_llvm_rc separator from -- to ++ to avoid conflict 2020-08-07 11:47:15 -04:00
Brad King
d8f7a05b37 Merge topic 'cygwin-patches'
ecc1961768 FindTclsh: Drop Cygwin-specific behavior and use POSIX code path
af666acdf4 FindOpenGL: Drop Cygwin-specific behavior and use POSIX code path
8edbc59e46 install: Use case-sensitive pattern matching on Cygwin
24482499ea FindPerlLibs: Add versioned perl library name for Cygwin

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5092
2020-08-07 11:05:39 -04:00
Brad King
304f159af4 Merge topic 'CUDAToolkit-no-nvcc'
7cc815a2a6 CUDAToolkit: Detect CUDA SDK that don't have nvcc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: Raul Tambre <raul@tambre.ee>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5061
2020-08-07 11:04:54 -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
Lemures Lemniscati
ecc1961768 FindTclsh: Drop Cygwin-specific behavior and use POSIX code path
Based on downstream patch from Cygwin package for CMake by Marco Atzeri:

* 64864eb8f0/cmake/3.17.3-findtclsh.patch
2020-08-06 12:37:16 -04:00
Lemures Lemniscati
af666acdf4 FindOpenGL: Drop Cygwin-specific behavior and use POSIX code path
Based on downstream patch from Cygwin package for CMake by Marco Atzeri:

* 64864eb8f0/cmake/3.17.3-opengl.patch
2020-08-06 12:36:55 -04:00
Lemures Lemniscati
24482499ea FindPerlLibs: Add versioned perl library name for Cygwin
Based on downstream patch from Cygwin package for CMake by Marco Atzeri:

* 64864eb8f0/cmake/perl-libs.patch
2020-08-06 12:35:56 -04:00
Brad King
4daf76e10a Merge topic 'compiler_flags'
f76c20da63 Toolchain: Test compiler initial settings
db486da265 Toolchain: Update documentation for initial compiler flags
deec2f587c Toolchain: Take CMAKE_<lang>_FLAGS_INIT into account during compiler detection
ca899af3e2 Toolchain: Handle repeated invocations of CMake with -DCMAKE_C_COMPILER
12ba89e142 Toolchain: Make `/path/comp;-argn' behave the same as 'comp;-argn'
6f1af899db Toolchain: Capture all arguments from CMAKE_<LANG>_COMPILER
ec1d3bc0b6 cmake: avoid exception when printing "changed variables" message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4136
2020-08-06 11:00:12 -04:00
Brad King
fdcb7483d1 Merge topic 'UseSWIG-support-files-in-subdirectories'
50e53eaed9 UseSWIG: Take care of support files in sub-directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5097
2020-08-06 10:53:36 -04:00
Brad King
ab2366609e Merge topic 'support_list_google_test_executor'
8829d2caba GoogleTest: Restore support for list arguments in TEST_EXECUTOR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5084
2020-08-06 10:37:03 -04:00
Marc Chevrier
50e53eaed9 UseSWIG: Take care of support files in sub-directories
Fixes: #20833
2020-08-04 16:19:10 +02: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
Robert Maynard
7cc815a2a6 CUDAToolkit: Detect CUDA SDK that don't have nvcc
When a CUDA sdk doesn't have nvcc, defer to the existence of
a version.txt file. When we do this fall back we also reconstruct
the CUDA version via version.txt

Fixes #20643
2020-07-30 15:56:52 -04:00