48823 Commits

Author SHA1 Message Date
Brad King
aaa5eab410 CMake 3.18.2 v3.18.2 2020-08-20 08:20:32 -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
Brad King
590b8791a0 Merge topic 'gitlab-ci-msvc-14.27' into release-3.18
983cb0c891 gitlab-ci: Update Windows builds to MSVC 19.27

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5144
2020-08-20 07:53:12 -04:00
Brad King
eeaa890147 Merge topic 'msvc_c11' into release-3.18
f4373feda8 Tests: Fix RunCMake.try_compile test for C standards with MSVC 19.27

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5145
2020-08-20 07:49:27 -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
983cb0c891 gitlab-ci: Update Windows builds to MSVC 19.27 2020-08-19 14:53:46 -04:00
Brad King
f4373feda8 Tests: Fix RunCMake.try_compile test for C standards with MSVC 19.27
Since commit f7347f28c7 (MSVC: Record support for C11 and c_restrict,
2020-08-09) we know about MSVC C language standards.  Update the
`RunCMake.try_compile` test to be aware of this even when CMake is
itself configured by an older CMake that does not know this.
2020-08-19 14:52:52 -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
Brad King
09e8de75d5 Merge topic 'CMakeFindBinUtils-fallback' into release-3.18
6896e50967 CMakeFindBinUtils: Always consider plain binutils when not cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5137
2020-08-19 11:35:00 -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
Brad King
acd15bf146 Merge topic 'FindRuby_document_deprecated_variables' into release-3.18
e7fe0b24c4 FindRuby: Add documentation for deprecated variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5120
2020-08-12 12:22:45 -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
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
edd908fc39 Merge topic 'gitlab-ci-tag-cmake' into release-3.18
778ea72b59 gitlab-ci: add 'cmake' tag to all jobs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5121
2020-08-11 13:40:47 -04:00
Brad King
778ea72b59 gitlab-ci: add 'cmake' tag to all jobs
This will give us more granular control over which runners
accept jobs for CMake.
2020-08-11 13:19:05 -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
5c9edd38c6 Merge topic 'osx-archs-apple-only' into release-3.18
70ce1ad64a PCH: Avoid Apple-specific architecture flags on other platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5118
2020-08-11 08:54:15 -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
Brad King
70ce1ad64a PCH: Avoid Apple-specific architecture flags on other platforms
Since commit f593b354da (PCH: Add support for multi architecture iOS
projects, 2020-04-02, v3.18.0-rc1~414^2) the `OSX_ARCHITECTURES` target
property (and corresponding `CMAKE_OSX_ARCHITECTURES` variable) affects
flags on non-Apple platforms by accident.  Add a missing condition to
avoid this.

Fixes: #21072
2020-08-10 13:29:29 -04: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
b6da87c13f Merge topic 'xcode-try_compile-no-sign-backport' into release-3.18
97d581b25d Xcode: Explicitly turn off signing in try_compile projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5117
2020-08-10 11:23:14 -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
Joerg Bornemann
5b5be34811 Help: Add 3.18.2 release note about AUTOMOC_PATH_PREFIX default change 2020-08-10 10:49:55 -04:00
Brad King
db659e18bc Merge branch 'backport-3.17-automoc-path-prefix-off' 2020-08-10 10:49:18 -04:00
Brad King
72409ee089 Merge topic 'test-FindPkgConfig-isolate-env' into release-3.18
8b12982653 Merge branch 'backport-test-FindPkgConfig-isolate-env'
4c939b0d39 Tests: Isolate RunCMake.FindPkgConfig from caller environment
20eeb40aaf Tests: Isolate RunCMake.FindPkgConfig from caller environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5108
2020-08-10 10:45:54 -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
97d581b25d Xcode: Explicitly turn off signing in try_compile projects
Fixes: #18407, #20571, #20688
2020-08-10 14:28:38 +02: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
Brad King
56510b7d85 Merge branch 'backport-test-FindPkgConfig-isolate-env' into release-3.17
Merge-request: !5108
2020-08-07 10:51:48 -04:00
Brad King
8b12982653 Merge branch 'backport-test-FindPkgConfig-isolate-env' 2020-08-07 10:49:19 -04:00
Brad King
4c939b0d39 Tests: Isolate RunCMake.FindPkgConfig from caller environment
Avoid interference from `CMAKE_PREFIX_PATH` and friends if they
happen to be set in the environment from which the tests are run.
2020-08-07 10:47:25 -04:00
Brad King
20eeb40aaf Tests: Isolate RunCMake.FindPkgConfig from caller environment
Avoid interference from `CMAKE_PREFIX_PATH` and friends if they
happen to be set in the environment from which the tests are run.
2020-08-07 10:37:28 -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
Brad King
13e5df19fd Merge topic 'reuse_pch_no_delay' into release-3.18
ef97fbe6c2 PCH: Avoid unnecessary 30s delay on MSBuild Generator with REUSE_FROM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5102
2020-08-06 10:39:46 -04:00
Brad King
9c4130ed60 Merge topic 'support_list_google_test_executor' into release-3.18
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
Brad King
ab4895d6b2 Merge topic 'automoc_timestamp_deps' into release-3.18
9a9ed4b9d3 Merge branch 'backport-3.17-automoc_timestamp_deps'
7445c9a58a AutoGen: Add test to check for correct AutoMoc dependencies
a79056bb02 AutoGen: Fix over-specified direct dependencies of custom command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Aleix <aleixpol@kde.org>
Merge-request: !5085
2020-08-06 10:31:23 -04:00
Brad King
ce4216dedd Merge topic 'ninja-multi-rsp-remove-path' into release-3.18
cdb50af2f6 Ninja: Restore shorter path to response files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Merge-request: !5094
2020-08-06 10:28:27 -04:00