Commit Graph

11615 Commits

Author SHA1 Message Date
Brad King
ca11096fd3 Merge topic 'cpp23_gcc'
9fbbebe3d0 GNU: C++23 support
c9a1e06a18 GNU: Final C++20 flags
05f8c8178d GNU: C++17 default version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6108
2021-05-11 09:19:12 -04:00
Raul Tambre
9fbbebe3d0 GNU: C++23 support
Added in GCC commit 78739c2df788ee5c868d998a6333d453317d8711, released in 11.1.
No lettered variant beforehand this time around.

Implements #22139.
2021-05-10 10:19:13 -04:00
Raul Tambre
c9a1e06a18 GNU: Final C++20 flags
Added in GCC commit fb26050409473f5be54465beca114b7e48de43aa, released in 11.1.
2021-05-10 10:19:13 -04:00
Raul Tambre
05f8c8178d GNU: C++17 default version
Changed in GCC commit 0801f419440c14f6772b28f763ad7d40f7f7a580, released in 11.1.
2021-05-10 10:19:13 -04:00
Brad King
3928f31a26 Merge topic 'codespell'
fd02f10103 Xcode: Fix typos and spelling in error message
5950e54325 Source: Fix typos and spelling in comments
7072d83772 Help: Fix typos and spelling in documentation
03b1140ddc CONTRIBUTING: Fix typos and spelling
87f8843d8b FindMatlab: Fix spelling in warning and documentation
15cc39ed7f Modules: Fix typos and spelling in documentation
f015c36c5a Modules: Fix typos and spelling in comments of generated code
dad5b9d845 Modules: Fix typos and spelling in comments
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6099
2021-05-10 10:13:06 -04:00
Brad King
961837a244 Merge topic 'FindBoost-1.76'
79be37b94e FindBoost: Add support for Boost 1.76

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6100
2021-05-10 10:06:53 -04:00
Brad King
b2f1345aaf Merge topic 'FindBoost-1.76' into release-3.20
79be37b94e FindBoost: Add support for Boost 1.76

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6100
2021-05-10 10:06:52 -04:00
Brad King
f889758ac7 Merge topic 'ep-update-git-hash-missing'
5e941a545b ExternalProject: Ensure git fetch if updating to hash we don't have yet

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6109
2021-05-10 10:05:11 -04:00
Craig Scott
5e941a545b ExternalProject: Ensure git fetch if updating to hash we don't have yet
In ac6a4d4884 (ExternalProject: Improve robustness of update step,
2020-10-17), the method used to check whether we already have a
commit or not was changed from using git rev-list to git rev-parse.
The new logic assumed rev-parse would output nothing if given a commit
hash it didn't know about, but it simply prints the hash again without
raising an error in this scenario. Amend that logic by adding ^{commit} to
the ref to ensure we do get an error if that ref is not currently known.

Fixes: #22166
2021-05-09 12:33:16 +10:00
Josef Angstenberger
87f8843d8b FindMatlab: Fix spelling in warning and documentation 2021-05-07 17:00:16 +02:00
Josef Angstenberger
15cc39ed7f Modules: Fix typos and spelling in documentation 2021-05-07 17:00:16 +02:00
Josef Angstenberger
f015c36c5a Modules: Fix typos and spelling in comments of generated code 2021-05-07 17:00:15 +02:00
Josef Angstenberger
dad5b9d845 Modules: Fix typos and spelling in comments 2021-05-07 17:00:15 +02:00
Brad King
7e0bec20a7 Merge topic 'FindProtobuf-grpc-plugin'
f2a4b879b1 FindProtobuf: Add PLUGIN parameter to protobuf_generate

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6068
2021-05-07 09:14:43 -04:00
Brad King
fd7293f36d Merge topic 'Fujitsu-Fortran-Ninja'
284d12a426 Fujitsu: Make explicit Fortran preprocessing under Ninja more robust

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6080
2021-05-07 09:13:51 -04:00
Brad King
fdbb5a599f Merge topic 'improve_cuda_toolkit_extraction_regex' into release-3.20
5e931c5a97 CUDA: improve regex for CUDA Toolkit root from nvcc verbose output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6094
2021-05-07 09:12:08 -04:00
Brad King
26751418a3 Merge topic 'improve_cuda_toolkit_extraction_regex'
5e931c5a97 CUDA: improve regex for CUDA Toolkit root from nvcc verbose output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6094
2021-05-07 09:12:08 -04:00
Brad King
79be37b94e FindBoost: Add support for Boost 1.76
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_76_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.76.0 source tree.
They are the same as 1.75's dependencies, so just update
the version check for warning about newer versions.

Fixes: #22167
2021-05-07 08:57:43 -04:00
Frank Lange
f2a4b879b1 FindProtobuf: Add PLUGIN parameter to protobuf_generate
This allows for example reusing the function for generating gRPC code by
specifying which grpc plugin to use.
2021-05-06 13:42:21 -04:00
Eisuke Kawashima
284d12a426 Fujitsu: Make explicit Fortran preprocessing under Ninja more robust
Tell the Fortran compiler to write preprocessor output directly to a
file, as we do for the GNU compiler.  The previous "redirect stdout"
approach could break checks using flags that add information to stdout
when called with `-###`.

Fixes: #22156
2021-05-06 13:11:48 -04:00
Robert Maynard
5e931c5a97 CUDA: improve regex for CUDA Toolkit root from nvcc verbose output
The original regular expression was greedy and would match any
environment variable ending with `TOP` (like `DESKTOP`). This is an
issue on windows where `nvcc -v` would output all environment variables
before the compiler's verbose output.

To resolve this issue we use a tighter match algorithm that looks
for `#$ TOP=` instead of `TOP=`.

Fixes: #22158
2021-05-06 12:08:24 -04:00
Brad King
7973f97828 Merge topic 'doc-tls'
7398993f5b Help: Document CMAKE_TLS_VERIFY variable explicitly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6064
2021-05-05 10:08:45 -04:00
Brad King
06d103889c Merge topic 'clang-ipo-support'
3dd776ccfd Windows-Clang: Support duplicate object names in LTO archives

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6082
2021-05-05 10:07:26 -04:00
Brad King
4ff6c5e34c Merge topic 'binutils-var-private'
c33fb2e664 BinUtils: Use more-private temporary variable names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6085
2021-05-05 10:06:03 -04:00
Brad King
c33fb2e664 BinUtils: Use more-private temporary variable names
Since commit 4d786dfcfa (BinUtils: Avoid clobbering a variable named
without a private prefix, 2021-04-06, v3.20.1~4^2) we use variables
named `_tool` and `_name`, but these may still be common enough to
affect project code.  Use `_CMAKE_TOOL` and `_CMAKE_TOOL_NAME` instead,
and unset them when finished.

Fixes: #22140
2021-05-04 12:44:14 -04:00
Michael Hirsch
7398993f5b Help: Document CMAKE_TLS_VERIFY variable explicitly
Previously it was mentioned only in the `file` and `ExternalProject`
documentation.
2021-05-04 12:29:13 -04:00
Brad King
abc78a3557 Merge topic 'mingw-archive-no-replace'
e8f0b75ff9 Windows-GNU: Support duplicate object names when linking shared libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6081
2021-05-04 11:30:38 -04:00
Brad King
b78d312de6 Merge topic 'findswig-clean'
229dd42158 Change find_path scope and add quotes
ff6f7b232f FindSWIG: reduce calls to SWIG exe, and clean up variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6075
2021-05-04 11:28:33 -04:00
Brad King
a0594739d1 Merge topic 'useswig-includes'
d2296cdaab UseSWIG: remove duplicate target includes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6074
2021-05-04 11:26:51 -04:00
Brad King
79427dccc2 Merge topic 'FindBLAS-mkl-omp'
20ab504591 FindBLAS: Do not statically link against iomp5 in the case of Intel MKL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6001
2021-05-04 11:23:11 -04:00
Brad King
7e31edee22 Merge topic 'compile-features-lang-vars'
bd16a985fc CompilerId/Features: Tolerate variables named for languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Timothy Brackett <brackett.tc@gmail.com>
Merge-request: !6060
2021-05-04 11:20:39 -04:00
Brad King
3dd776ccfd Windows-Clang: Support duplicate object names in LTO archives
Update the archive rules added by commit 6e3655db2c (Clang: add LTO
support for GNU-command line clang on windows, 2019-07-08,
v3.16.0-rc1~161^2~3) to match the `ar` convention we use for normal
archives.

Issue: #21988
2021-05-03 14:37:20 -04:00
Brad King
e8f0b75ff9 Windows-GNU: Support duplicate object names when linking shared libraries
Extend the change from commit 39d0ade07e (Windows-GNU: Support duplicate
object names in large archives (#14874), 2014-04-14, v3.1.0-rc1~629^2~1)
to apply to the temporary archive we create for linking shared libraries
with MinGW tools.

Issue: #21988
2021-05-03 14:29:26 -04:00
Seth R Johnson
229dd42158 Change find_path scope and add quotes 2021-05-03 13:30:32 -04:00
Brad King
bd16a985fc CompilerId/Features: Tolerate variables named for languages
If a `CMakeLists.txt` or `CMAKE_TOOLCHAIN_FILE` sets a variable named
`C`, `CXX`, or `CUDA`, we were previously comparing each enabled
language name to the value of that variable, rather than the name
itself.  Double-quote the string to take advantage of policy `CMP0054`,
but also add "x" prefixes to support projects that do not set the
policy.

Fixes: #22125
2021-05-03 10:22:23 -04:00
Seth R Johnson
ff6f7b232f FindSWIG: reduce calls to SWIG exe, and clean up variables
If all SWIG cache variables (EXECUTABLE, DIR, VERSION) are set,
there should be no need to invoke the SWIG exe on a reconfigure. This
changeset reduces the number of calls to the SWIG executable, and
additonially prevents temporary `SWIG_xxx` values from propagating outside
the `find_package` call.

I also refactored the conditionals to be less nested (and thus more
predictable), including changing theh definition of SWIG_USE_FILE to
reflect that it's if and only if SWIG_FOUND is trure.
2021-05-02 10:05:44 -04:00
Seth R Johnson
d2296cdaab UseSWIG: remove duplicate target includes 2021-05-02 09:17:57 -04:00
Eisuke Kawashima
20ab504591 FindBLAS: Do not statically link against iomp5 in the case of Intel MKL
fix #21811
2021-04-30 08:38:41 +09:00
Brad King
d94f8516ab Merge topic 'find-msys'
990b370401 FindMsys: Add a module to find MSYS and some bundled packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6057
2021-04-29 09:22:27 -04:00
Brad King
3147f541f7 Merge topic 'intel-2021'
9c479c7c40 IntelLLVM: Add special case for ifx 2021.1 version extraction
b7193ab18f Intel: Update Classic compiler version detection for 2021

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6052
2021-04-29 09:15:32 -04:00
Orgad Shaneh
990b370401 FindMsys: Add a module to find MSYS and some bundled packages 2021-04-28 10:41:17 -04:00
Brad King
9c479c7c40 IntelLLVM: Add special case for ifx 2021.1 version extraction
The ifx beta versions forgot to define `__INTEL_LLVM_COMPILER`, and
instead define `__INTEL_COMPILER == 201900`.  Add a special case.

Issue: #22120
2021-04-28 10:21:27 -04:00
Brad King
b7193ab18f Intel: Update Classic compiler version detection for 2021
The value of the `__INTEL_COMPILER` macro changed convention starting
in version 2021.

Fixes: #22120
2021-04-28 10:20:59 -04:00
Brad King
c58ec3209b Merge topic 'cpack-nsis-uninstall-name'
79f48da5c2 CPack/NSIS: Fix CPACK_NSIS_UNINSTALL_NAME when not Uninstall.exe

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6050
2021-04-28 09:51:00 -04:00
Brad King
11530e5504 Merge topic 'ARMClang-cpu-arch-flags'
c4941b7e66 ARMClang: Do not automatically add cpu/arch compile or link options
0078db3888 ARMClang: Separate cpu/arch flags from preceding flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jaeden Amero <kitware@patater.com>
Merge-request: !6035
2021-04-28 09:49:41 -04:00
Markus Israelsson
79f48da5c2 CPack/NSIS: Fix CPACK_NSIS_UNINSTALL_NAME when not Uninstall.exe
If a previous installation was detected by the NSIS script the
uninstaller was not correctly run unless it was still named
`Uninstall.exe`.  This meant that using `CPACK_NSIS_UNINSTALL_NAME`
was simply broken.

Fixes: #22103
2021-04-27 14:06:42 -04:00
Lingkai Dong
c4941b7e66 ARMClang: Do not automatically add cpu/arch compile or link options
The compile options `--march=<arch>` and `--mcpu=<cpu>` and the
link option `--cpu=<cpu>` are automatically added by CMake based
on `CMAKE_SYSTEM_PROCESSOR` or `CMAKE_SYSTEM_ARCH`. But this is not
sufficient, because armclang also supports enabling or disabling
features using `+<feature>`:

    -mcpu=<name>[+[no]<feature>+...]

For example:

    -mcpu=cortex-a57+nocrypto+nofp+nosimd+crc

(Reference: https://developer.arm.com/documentation/dui0774/k/Compiler-Command-line-Options/-mcpu?lang=en)

The problem is, even if a project adds a flag with features it needs,
CMake still adds flags, resulting in code that is compiled with wrong
CPU features and unable to run.

Add policy `CMP0123` to not automatically add compile or link options,
and let projects set them instead.

Co-Author: Brad King <brad.king@kitware.com>
Fixes: #21173
2021-04-27 14:03:15 -04:00
Brad King
0078db3888 ARMClang: Separate cpu/arch flags from preceding flags
Suggested-by: Kim Kryger
2021-04-27 13:58:57 -04:00
Brad King
95afd87917 Merge topic 'FindIconv-no-libc'
404025b00c FindIconv: Avoid explicitly finding C runtime library
8b30e7adfb FindIntl: Use explicit find_library signature NAMES keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
Merge-request: !6046
2021-04-27 13:54:51 -04:00
Brad King
404025b00c FindIconv: Avoid explicitly finding C runtime library
If `iconv` functionality is built into the C runtime library,
we do not need to link any libraries.  Do not find `libc`.

Fixes: #22114
2021-04-26 14:30:29 -04:00