Commit Graph

11715 Commits

Author SHA1 Message Date
Orgad Shaneh
ddcd1469e8 MSYS: Add support for running under MSYS runtime environment
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00
Brad King
c9aec3d4a9 FindCurses: Do not assume ncurses is installed on CYGWIN 2021-04-26 14:27:34 -04:00
Brad King
8b30e7adfb FindIntl: Use explicit find_library signature NAMES keyword 2021-04-26 13:00:35 -04:00
Brad King
9d4a0f12fb Merge topic 'SWIG'
e3e005dbd8 UseSWIG: use swig dependencies for Xcode generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6042
2021-04-26 11:35:22 -04:00
Brad King
3c1655936f Merge topic 'lzma-threads'
c5c130e675 cmArchiveWrite: Consolidate multiple ways to set thread count
5380d858ff liblzma: Enable multi threaded stream encoding support
e9065e96dc Merge branch 'upstream-liblzma' into lzma-threads
ee909a8e8b liblzma 2020-03-17 (2327a461)
741b85b42b liblzma: Revise update script to get version 5.2.5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6014
2021-04-26 11:33:49 -04:00
Brad King
8bc64a0c40 Merge topic 'doc-compile-features-wcdh'
1f4ec3f4a7 Help: Do not recommend WCDH in cmake-compile-features(7)
1cc63f2cd5 Help: Fix typos in cmake-compile-features(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6037
2021-04-26 11:27:17 -04:00
Marc Chevrier
e3e005dbd8 UseSWIG: use swig dependencies for Xcode generator 2021-04-23 17:09:12 +02:00
Brad King
1f4ec3f4a7 Help: Do not recommend WCDH in cmake-compile-features(7)
Since commit da7ad7997e (WriteCompilerDetectionHeader: Add policy to
remove module, 2020-12-04, v3.20.0-rc1~350^2), the WCDH module is
deprecated.  Update the `cmake-compile-features(7)` manual section that
previously recommended WCDH to make such detection the project's
responsibility instead.  Move the old content of the section over to the
WCDH module to preserve it.
2021-04-23 10:44:53 -04:00
Brad King
7de707cd7e Merge topic 'cuda-host-compiler-windows'
625ef88a92 CUDA: Add CMAKE_CUDA_HOST_COMPILER support on Windows non-VS generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6030
2021-04-23 10:30:15 -04:00
Nils Gladitz
c5c130e675 cmArchiveWrite: Consolidate multiple ways to set thread count
Merge use of SetFilterOption() into more abstract thread count
in cmArchiveWrite constructor.

libarchive defaulting of threads for threads == 0 seems to be
configuration dependent. Preemptively default thread count via
std::thread::hardware_concurrency().

Also allow negative values for the thread count in which case
the detected hardware concurrency is also used but the given
absolute thread count is used as an upper limit.
2021-04-22 15:40:13 -04:00
Nils Gladitz
5380d858ff liblzma: Enable multi threaded stream encoding support 2021-04-22 15:40:06 -04:00
Brad King
298760661f ExternalData: Improve error message when we fail to create a file
Report the underlying system error.
2021-04-22 13:06:11 -04:00
unknown
625ef88a92 CUDA: Add CMAKE_CUDA_HOST_COMPILER support on Windows non-VS generators 2021-04-22 11:40:46 -04:00
Brad King
cb6889a09c FindLAPACK: Fix finding generic LAPACK with BLA_STATIC
Fixes: #21071
2021-04-21 14:41:46 -04:00
Brad King
193714d67d Find{BLAS,LAPACK}: Simplify search for static libraries
Now that `CHECK_{BLAS,LAPACK}_LIBRARIES` are functions, we can set
`CMAKE_FIND_LIBRARY_SUFFIXES` locally without affecting the global
state.  This avoids the need for local state switching that was added in
commit 9ef82d95d8 (FindBLAS: Fix detection of OpenMP as dependency of
BLA_STATIC, 2021-04-07, v3.20.1~3^2), so remove that.
2021-04-21 14:23:17 -04:00
Brad King
2e2db28e2f Find{BLAS,LAPACK}: Simplify check_function_exists state maintenance
Now that `CHECK_{BLAS,LAPACK}_LIBRARIES` are functions, we can set
`CMAKE_REQUIRED_QUIET` locally without affecting the global state.
2021-04-21 14:20:28 -04:00
Brad King
f6ea1b59e1 Merge topic 'cxxprefix'
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:51 -04:00
Brad King
16f213efa3 Merge topic 'fujitsu-fixup'
cc0d2004b2 Fujitsu: Fix C90 standard flags
ec78e86cc8 FujitsuClang: Use GNU-like command-line

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5997
2021-04-16 11:38:40 -04: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
Paul Zehner
cc0d2004b2 Fujitsu: Fix C90 standard flags
Fix typos from commit 3c867cff4a (Fujitsu: Add support for the Fujitsu
compiler in Trad mode, 2020-12-22).
2021-04-14 15:19:59 -04:00
Paul Zehner
ec78e86cc8 FujitsuClang: Use GNU-like command-line 2021-04-14 15:18:24 -04:00
Brad King
dcd604ee62 Find{BLAS,LAPACK}: Make library variable names more robust 2021-04-14 14:57:03 -04:00
Brad King
98ef6632d9 Find{BLAS,LAPACK}: Generalize recognition of dependencies as link flags 2021-04-14 14:57:03 -04:00
Brad King
a57c4eef76 Find{BLAS,LAPACK}: Convert internal CHECK_*_LIBRARIES to functions 2021-04-14 14:57:03 -04:00
Brad King
a5a6ac7033 Find{BLAS,LAPACK}: Clarify name of internal argument for dependencies 2021-04-14 14:57:03 -04:00
Brad King
d248401d12 Find{BLAS,LAPACK}: Simplify appending to list of libraries 2021-04-14 14:57:03 -04:00
Brad King
116edb5c04 Find{BLAS,LAPACK}: Revert bad refactoring of internal CHECK_*_LIBRARIES
Refactoring in commit 4c74c86f40 (FindBLAS/LAPACK: Add support for the
Fujitsu SSL2 library, 2021-01-27) was done in order to support calling
`find_library` on the dependencies as well as the candidate libraries.
However, it broke a few things:

* Intel MKL's BLAS/LAPACK are no longer found.  We specify their
  dependencies using `-l...` flags, so we should not try to use
  `find_library` for them.

* The dependencies are repeated because we accumulate them in the
  `find_library` search loop and then append them at the end too.

Revert the incorrect part of the refactoring.  Retain the flags part
needed for the Fujitsu vendor.

Fixes: #22056
2021-04-14 14:55:51 -04:00
Brad King
ce97e2bdcb Merge topic 'find_threads_only_log_on_failure'
d6da6784bf FindThreads: Reduce amount of false positive error logging

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5988
2021-04-08 07:48:18 -04:00
Brad King
f39ea2e292 Merge topic 'flags-with-backslash'
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:09 -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
c3fab3e62d Merge topic 'cuda-depfile-ccbin'
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:15 -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
fd873ccaee Merge topic 'FindBLAS-default-OpenMP'
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:14 -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
79562b03c1 Merge topic 'binutils-var-private'
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:09 -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
6968500352 Merge topic 'ios-rpath-linker-flag'
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:56 -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
Robert Maynard
d6da6784bf FindThreads: Reduce amount of false positive error logging
When a CMake based project fails, users start looking at
CMakeError.log and think that the FindThread output is
the problem, but it is a false positive.

Now FindThreads only logs to `CMakeError.log` when it fails
to find a suitable flag, reducing the amount of false positives in `CMakeError.log`.

Fixes #16540, Fixes #19344
2021-04-06 15:51:34 -04:00
Ben Boeckel
cd48433e96 FindHDF5: add compiler-specific module search paths 2021-04-06 08:36:31 -04:00
Ben Boeckel
78287ec0af FindHDF5: track the "main" library for each language
This will be used to build up additional include paths to search.
2021-04-06 08:36:31 -04:00
Ben Boeckel
3654068e80 FindHDF5: find include directories after the library
Some include paths might depend on the library location (primarily for
Fortran).
2021-04-06 08:36:31 -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
ebc812a8d1 Merge topic 'nvhpc-lib-arch'
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
469b58e0b1 Merge topic 'UseSWIG-policies'
05881c1cbe Merge branch 'backport-UseSWIG-policies' into UseSWIG-policies
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
03cfcfb5ad Merge topic 'FindHDF5-new-fortran-library-name'
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:37 -04:00