Commit Graph

52149 Commits

Author SHA1 Message Date
Brad King
b84f1e6159 Autogen: Restore mocs_compilation in OBJECT libraries
Since commit f65f20938c (Autogen: Avoid processing CSharp targets,
2020-11-12, v3.20.0-rc1~301^2) we collect all sources for a target
earlier than previously.  Clear the sources cache so that it will be
re-computed later after AUTOGEN processing.

Fixes: #22085
2021-04-20 16:04:08 -04:00
Brad King
b0be93c5c7 Merge topic 'doc-if-IS_ABSOLUTE' into release-3.20
6234afdff4 Help: Document special cases for if(IS_ABSOLUTE)
789307b02f Help: Behavior of file(TO_NATIVE_PATH) depends on the host platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6016
2021-04-20 09:58:51 -04:00
Brad King
dc7871739f Merge topic 'cxxprefix' into release-3.20
4c741d945a BinUtils: Restore toolchain prefix detection from compiler name 'c++'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr>
Merge-request: !6011
2021-04-19 09:44:50 -04:00
Brad King
a2372f64b4 Merge topic 'mrjoel/add-missing-not' into release-3.20
370bebd921 Add missing 'not' in error messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6012
2021-04-19 09:44:02 -04:00
Craig Scott
6234afdff4 Help: Document special cases for if(IS_ABSOLUTE)
The meaning of "absolute path" was previously assumed knowledge,
but a number of special cases were left unspecified. The way some of
these are handled differs to the way that cmake_path(IS_ABSOLUTE)
works, so document those special cases so that the differing behavior
between these two commands is clearly defined.
2021-04-17 19:41:53 +10:00
Craig Scott
789307b02f Help: Behavior of file(TO_NATIVE_PATH) depends on the host platform 2021-04-17 19:41:53 +10:00
Brad King
afba2709f7 Merge topic 'ci-lint-delay' into release-3.20
661ff7f2d8 gitlab-ci: equally delay all jobs on integration branches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6013
2021-04-16 13:24:04 -04:00
Brad King
661ff7f2d8 gitlab-ci: equally delay all jobs on integration branches
When running a pipeline on an integration branch in `cmake/cmake`, delay
the lint jobs just as much as all the others.  This avoids starting them
unnecessarily during a sequence of merges over a short time range.
2021-04-16 12:15:15 -04:00
Brad King
e9da93e066 Merge topic 'depfile-reader-thread-safety' into release-3.20
53d523f2e1 autogen: fix race in depfile parsing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6008
2021-04-16 11:35:47 -04:00
Joel Johnson
370bebd921 Add missing 'not' in error messages 2021-04-16 07:47:59 -06:00
Lihua Zhao
4c741d945a BinUtils: Restore toolchain prefix detection from compiler name 'c++'
Since commit b12aec6c8d (BinUtils: prefer bin utils matching the
compiler version extension, 2020-12-11, v3.20.0-rc1~171^2) we recognize
`clangg++` and `g++` but not `c++`.  Restore `[gc]` in place of `g`
in the regex, as we had before that change.

Fixes: #22069
2021-04-16 09:20:16 -04:00
Kyle Edwards
53d523f2e1 autogen: fix race in depfile parsing
cmReadGccDepfile() calls cmSystemTools::CollapseFullPath(), which
is not thread safe due to internal caching. Serialize calls to
cmReadGccDepfile() in autogen to avoid thread safety issues.

Fixes: #22014
2021-04-15 15:25:38 -04:00
Brad King
81d796e3f2 Merge topic 'doc-error-unknown-arg' into release-3.20
06d26c7baf Help: Add 3.20 release note for error on unknown arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6003
2021-04-15 11:07:33 -04:00
Brad King
06d26c7baf Help: Add 3.20 release note for error on unknown arguments
This was left out of commit 1b6c5333a0 (cmake: Error out on unknown
arguments starting with `-`., 2020-11-30, v3.20.0-rc1~370^2).

Fixes: #22060
2021-04-14 11:46:05 -04:00
Brad King
b4a29a8d42 Merge topic 'openbsd-defines' into release-3.20
317a477283 OpenBSD: Fix system feature definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6000
2021-04-14 11:04:29 -04:00
Rafael Sadowski
317a477283 OpenBSD: Fix system feature definitions
Since commit f034b0f663 (CMake compilation: do not use compiler
extensions, 2020-03-14, v3.18.0-rc1~494^2), some sources explicitly
enable needed system APIs on some platforms using definitions like
`_POSIX_C_SOURCE` and `_XOPEN_SOURCE`.  Drop the definitions for
OpenBSD, which provides the POSIX APIs by default.
2021-04-14 11:02:29 -04:00
Brad King
d96ae57fb6 Merge topic 'ci-parallelism-limits' into release-3.20
3fd2cffb4d ci: limit builds by machine load
6317f92120 ci: pay attention to the machine load when running tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5989
2021-04-14 10:55:17 -04:00
Brad King
9765ccfa71 CMake 3.20.1 v3.20.1 2021-04-08 08:00:50 -04:00
Brad King
9be8441c20 Merge topic 'flags-with-backslash' into release-3.20
3953dfcb31 Restore support for backslashes in initial language-wide flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5995
2021-04-08 07:47:08 -04:00
Brad King
6d27dd3d98 Merge topic 'cuda-depfile-ccbin' into release-3.20
8e38985db7 Makefiles: Fix dependency extraction with CUDA < 10.2 and host compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !5992
2021-04-08 07:46:14 -04:00
Brad King
d6a0b24d10 Merge topic 'FindBLAS-default-OpenMP' into release-3.20
9ef82d95d8 FindBLAS: Fix detection of OpenMP as dependency of BLA_STATIC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5993
2021-04-08 07:45:13 -04:00
Brad King
3953dfcb31 Restore support for backslashes in initial language-wide flags
Refactoring in commit bdc40742bd (CMakeDetermineCompilerId: Test without
COMPILER_ID_FLAGS if REQUIRE_SUCCESS, 2021-02-27, v3.20.0-rc3~6^2) added
an extra macro layer through which flag strings are passed.  That caused
an extra level of argument re-parsing, and broke flags with backslashes.
Pass flags to the helper macro through variable names instead.

Fixes: #22041
2021-04-07 13:53:22 -04:00
Brad King
9ef82d95d8 FindBLAS: Fix detection of OpenMP as dependency of BLA_STATIC
Update the change from commit f7f3d8987a (FindBLAS: Add dependency of
OpenBLAS on OpenMP for BLA_STATIC, 2020-11-10, v3.20.0-rc1~492^2):

* If C is not enabled, find CXX OpenMP libraries instead.

* Do not use BLA_STATIC's custom CMAKE_FIND_LIBRARY_SUFFIXES for OpenMP.
  It can break projects that already call `find_package(OpenMP)` and
  expect a shared library.  Whether OpenMP is static is orthogonal to
  whether BLAS is static.

Fixes: #22039
Issue: #16221
2021-04-07 11:26:07 -04:00
Brad King
8e38985db7 Makefiles: Fix dependency extraction with CUDA < 10.2 and host compiler
Since commit 2c71d051fa (Makefiles Generators: use compiler for
dependencies generation, 2020-10-18, v3.20.0-rc1~392^2) we invoke `nvcc`
for CUDA < 10.2 a second time in order to generate a depfile.  When
`CMAKE_CUDA_HOST_COMPILER` is set, the second invocation is missing its
`-ccbin=` option, even after refactoring in commit 8981e3e7cc
(NVIDIA-CUDA: rely on new capabilities for deps generation, 2020-12-02,
v3.20.0-rc1~362^2).

Ideally we should move the `-ccbin=` flag into `Compiler/NVIDIA-CUDA`,
but that will add `CMAKE_CUDA_HOST_COMPILER` support on Windows in
command-line generators but not the Visual Studio generators.
For now, add the flag to the depfile command specifically.

Fixes: #22037
2021-04-07 10:54:27 -04:00
Brad King
f8af94a212 Merge topic 'binutils-var-private' into release-3.20
4d786dfcfa BinUtils: Avoid clobbering a variable named without a private prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5986
2021-04-07 10:08:08 -04:00
Brad King
196376a33e Merge topic 'ios-rpath-linker-flag' into release-3.20
4aed96e230 Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5980
2021-04-07 10:06:55 -04:00
Brad King
4d786dfcfa BinUtils: Avoid clobbering a variable named without a private prefix
Refactoring in commit b12aec6c8d (BinUtils: prefer bin utils matching
the compiler version extension, 2020-12-11, v3.20.0-rc1~171^2)
accidentally leaked a `TOOL` variable.  Name temporary variables with a
private prefix.

Fixes: #22035
2021-04-07 08:43:45 -04:00
Brad King
9780079ba6 Merge branch 'release-3.19' into release-3.20 2021-04-06 14:07:31 -04:00
Brad King
c9b27dace7 CMake 3.19.8 v3.19.8 2021-04-06 13:21:53 -04:00
Ben Boeckel
3fd2cffb4d ci: limit builds by machine load
To avoid starving test jobs, the build jobs should also back off if
there is a lot of machine load.
2021-04-06 11:16:09 -04:00
Ben Boeckel
6317f92120 ci: pay attention to the machine load when running tests
CMake's test suite is sensitive to machine load and can cause spurious
timeouts. To acknowledge this, prevent CTest from spawning tests into a
busy machine.
2021-04-06 11:16:09 -04:00
Brad King
b4c3e8e8e7 Merge topic 'ci-linux-updates' into release-3.20
c6a45968d6 ci: Enable jq-based tests on Linux builds
8ca8b74a96 ci: add jq and DevIL to Debian and Fedora base images

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5987
2021-04-06 11:10:46 -04:00
Brad King
c6a45968d6 ci: Enable jq-based tests on Linux builds 2021-04-06 10:49:17 -04:00
Brad King
8ca8b74a96 ci: add jq and DevIL to Debian and Fedora base images 2021-04-06 10:49:16 -04:00
Brad King
c80583d519 Merge branch 'release-3.19' into release-3.20 2021-04-06 08:46:21 -04:00
Brad King
2e029ec598 Merge topic 'rel-file-table' into release-3.20
e17006c497 Utilities/Release: Add deprecation fields to File Table v1
89ab613248 Utilities/Release: Update file table for 3.20.0
c5777e5421 Merge branch 'backport-3.19-rel-file-table' into rel-file-table
f9f59fb0b2 Merge branch 'release-3.19' into backport-3.19-rel-file-table
30959aec8f Utilities/Release: Update file table for 3.19.3
d206c8f1ec Merge tag 'v3.19.3' into backport-3.19-rel-file-table
004dbbaddd Utilities/Release: Update file table for 3.19.2
1e3301a28c Merge tag 'v3.19.2' into backport-3.19-rel-file-table
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !5961
2021-04-06 08:44:53 -04:00
Brad King
48f9a152bb Merge branch 'backport-3.19-rel-file-table' into release-3.19 2021-04-06 08:43:24 -04:00
Brad King
ea7290a7a2 Merge branch 'release-3.18' into release-3.19 2021-04-06 08:42:54 -04:00
Brad King
d0568edd40 Merge branch 'backport-3.18-rel-file-table' into release-3.18
Merge-request: !5961
2021-04-06 08:42:23 -04:00
Brad King
e061a201b6 Merge topic 'nvhpc-lib-arch' into release-3.20
764606e256 CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths
5d44d73bbe CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5984
2021-04-06 08:32:34 -04:00
Brad King
2d6a3fd626 Merge topic 'UseSWIG-policies' into release-3.20
c3d0b25514 UseSWIG: Transform swig depfile to match Ninja generator paths
8c525d7e16 UseSWIG: Run using policy settings from includer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5983
2021-04-06 08:31:40 -04:00
Brad King
c755fd166d Merge topic 'FindHDF5-new-fortran-library-name' into release-3.20
ff84a80b46 FindHDF5: search for the new Fortran HL library name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5976
2021-04-06 08:30:36 -04:00
Brad King
5c2406b2da Merge branch 'release-3.19' into release-3.20 2021-04-06 08:29:30 -04:00
Brad King
80abb2fdb5 Merge branch 'libarchive-u_char' into release-3.19
Merge-request: !5981
2021-04-06 08:28:38 -04:00
Brad King
a4ee2b64bd Merge topic 'libarchive-u_char' into release-3.20
a9fc751e65 libarchive: Use uint8_t instead of u_char

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5981
2021-04-06 08:28:22 -04:00
Brad King
345ede9fcd Merge topic 'add_q_namespace_export_docs' into release-3.20
3538f1c69b Help: Add Q_NAMESPACE_EXPORT to CMAKE_AUTOMOC_MACRO_NAMES default values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5982
2021-04-06 08:27:15 -04:00
Craig Scott
4aed96e230 Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG on non-macOS too
Since CMake 3.19, we no longer support macOS SDKs older than 10.5,
which corresponds to Xcode 3. Supporting older Xcode versions for
device platforms is also not realistic. We therefore expect the -rpath
linker option should always be supported now.

When targeting iOS, tvOS or watchOS, the previous disabling of -rpath
support meant that the install_name_dir of shared libraries and
frameworks was unable to use @rpath. This resulted in embedding
absolute paths for their install_name. When they were embedded in an
app bundle, this would cause the app to fail at runtime. By enabling the
-rpath linker option, the default install_name_dir is now @rpath for these platforms, which results in binaries that do work at runtime.

Fixes: #20036
2021-04-06 11:46:56 +10:00
Robert Maynard
764606e256 CMakeDetermineCompilerABI: Extract lib arch from implicit object file paths
The NVHPC compiler does not have any implicit link directories that can
be used to detect `CMAKE_LIBRARY_ARCHITECTURE`, but it does have
implicit object files.  Extract implicit object file paths from link
lines and check them for the `CMAKE_LIBRARY_ARCHITECTURE` pattern.

Issue: #22024
2021-04-05 17:41:10 -04:00
Robert Maynard
5d44d73bbe CMakeDetermineCompilerABI: Revert "Parse library arch from versioned paths"
The change in commit 657fc3a9a7 (CMakeDetermineCompilerABI: Parse
library arch from versioned paths, 2021-02-03, v3.20.0-rc1~40^2) caused
`CMAKE_LIBRARY_ARCHITECTURE` to be populated on non-multiarch platforms
if their compilers happen to use `$arch/$version` library directories.
Revert the use of versioned library paths.

Fixes: #22024
2021-04-05 16:40:43 -04:00
Brad King
c3d0b25514 UseSWIG: Transform swig depfile to match Ninja generator paths
Since commit 89b01b04fa (UseSWIG: use swig tool to generate
dependencies, 2021-01-12, v3.20.0-rc1~120^2) we use a tool-provided
depfile to extract dependencies under the Ninja generator.  Enable
`CMP0116` to ensure depfile paths are translated to match what the Ninja
generator writes to the build manfiest.

Fixes: #22029
2021-04-05 14:36:34 -04:00