Commit Graph

11121 Commits

Author SHA1 Message Date
Brad King
c00a6d3967 MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default
The `/GR` flag has been on by default since MSVC cl 14.0 from VS 2005.
Remove it from the default flags to make it easier for projects to pass
`/GR-` themselves to turn it off.

Projects may be using string processing to replace `/GR` with another
flag, so we cannot simply drop it.  Add a policy to drop it in a
compatible way.

Fixes: #21428
2020-11-13 11:46:23 -05:00
Brad King
6114c8e994 MSVC: Factor out initialization of /GR flag 2020-11-13 10:50:25 -05:00
Brad King
225fb10f67 Merge topic 'usejava_helpers'
cb28d9af1f UseJava: Move helper scripts to subdirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5501
2020-11-13 09:48:56 -05:00
Brad King
1bedfa7c5d Merge topic 'android-abis'
3a2bb717ee Android: load ABI information from abis.cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5499
2020-11-13 09:46:40 -05:00
Brad King
c457670711 Merge topic 'qtifw-archivegen'
5ab75dd7dd CPack/IFW: Locate the archivegen utility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5503
2020-11-13 09:45:33 -05:00
Brad King
5dd1d841f3 Merge topic 'qtifw-4.0'
63ae96a317 CPack/IFW: Add support for QtIFW 4.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5502
2020-11-13 09:44:28 -05:00
Brad King
72f8237422 Merge topic 'xcode-compiler-id-path'
bcbae3f71e Xcode: Extract CMAKE_<LANG>_COMPILER from compiler id with multiple archs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5506
2020-11-13 09:41:25 -05:00
Brad King
5ba7559966 Merge topic 'xcode-compiler-id-arch'
98849039cc Xcode: Default to arm64 arch on Apple Silicon hosts during compiler id

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5505
2020-11-13 09:40:09 -05:00
Erlend Egeberg Aasland
5ab75dd7dd CPack/IFW: Locate the archivegen utility
Fixes: #21427
2020-11-12 21:22:53 +01:00
Brad King
bcbae3f71e Xcode: Extract CMAKE_<LANG>_COMPILER from compiler id with multiple archs
When targeting a platform that supports multiple architectures, Xcode
may choose to build all of them in our small compiler id project.
Update the regex we use to extract the path to the compiler from
the Xcode output to account for this.

Fixes: #21425
2020-11-12 12:20:34 -05:00
Brad King
98849039cc Xcode: Default to arm64 arch on Apple Silicon hosts during compiler id
In commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple
Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we forgot to update the
compiler id architecture selection added by commit 26673bf480 (Xcode:
Explicitly specify default native architecture on macOS, 2020-07-16,
v3.18.1~20^2).

Issue: #21425
2020-11-12 11:26:19 -05:00
Nikita Nemkin
cb28d9af1f UseJava: Move helper scripts to subdirectory
Also, exclude them from the help module index.
2020-11-12 20:14:05 +05:00
Erlend Egeberg Aasland
63ae96a317 CPack/IFW: Add support for QtIFW 4.0
installerbase v4.0 segfaults on macOS if you pass `--framework-version`,
so re-order flags to try `--version` first.

Fixes: #21426
2020-11-12 09:53:51 -05:00
Brad King
8be538b092 Merge topic 'ctest-batch'
aa754e2913 CTest: Remove additional batch test variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5494
2020-11-12 09:14:39 -05:00
Brad King
08b0668043 Merge topic 'FindBLAS/OpenBLAS-OpenMP'
f7f3d8987a FindBLAS: Add dependency of OpenBLAS on OpenMP for BLA_STATIC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5487
2020-11-12 09:12:56 -05:00
Brad King
d8aaa06b54 Merge topic 'FindRuby-vs-runtimes' into release-3.19
d4a16427e2 FindRuby: Consider more VS runtime suffix combinations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5486
2020-11-12 09:09:52 -05:00
Brad King
10c46689ec Merge topic 'FindRuby-vs-runtimes'
d4a16427e2 FindRuby: Consider more VS runtime suffix combinations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5486
2020-11-12 09:09:52 -05:00
Haibo Huang
3a2bb717ee Android: load ABI information from abis.cmake
They are added to NDK and planned to release in r23:
https://android-review.googlesource.com/c/platform/ndk/+/1493421
2020-11-11 17:11:45 -08:00
Brad King
fd8eef0341 Merge topic 'FortranCInterface-CMP0056'
15e77fbd40 FortranCInterface: Honor CMAKE_EXE_LINKER_FLAGS under CMP0056

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5483
2020-11-11 09:41:10 -05:00
Brad King
6f61b59e74 Merge topic 'android-abi' into release-3.19
a585b75df9 Android: Use NDK_KNOWN_DEVICE_ABI{32,64}S instead of NDK_DEFAULT_ABIS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5488
2020-11-11 09:33:02 -05:00
Brad King
566ad7c61e Merge topic 'android-abi'
a585b75df9 Android: Use NDK_KNOWN_DEVICE_ABI{32,64}S instead of NDK_DEFAULT_ABIS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5488
2020-11-11 09:33:02 -05:00
Seth R Johnson
aa754e2913 CTest: Remove additional batch test variables
Follow up commit f984296ba8 (CTest: Remove unfinished batch test mode,
2017-12-08, v3.11.0-rc1~217^2).
2020-11-11 09:12:14 -05:00
Eisuke Kawashima
f7f3d8987a FindBLAS: Add dependency of OpenBLAS on OpenMP for BLA_STATIC
Fixes: #16221
2020-11-11 09:10:22 -05:00
Silvio Traversaro
d4a16427e2 FindRuby: Consider more VS runtime suffix combinations
These are needed to find recent Ruby versions for builds using
recent VS versions.

Fixes: #21066
2020-11-11 08:30:42 -05:00
Haibo Huang
a585b75df9 Android: Use NDK_KNOWN_DEVICE_ABI{32,64}S instead of NDK_DEFAULT_ABIS
Revise logic from commit 1ab574a0f4 (Android: Add support for NDK r22,
2020-10-07, v3.19.0-rc1~18^2) that loads ABI tables from the NDK.

`NDK_DEFAULT_ABIS` means the abis to build by default.
Use `NDK_KNOWN_DEVICE_ABI{32,64}S` instead.

In practise they have never been different. Fix to make it more precise.
2020-11-10 11:05:36 -08:00
Brad King
f4f3fca99f Merge topic 'android-root'
cbc51a8be3 Android: restructure android search paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !5479
2020-11-10 09:42:31 -05:00
Brad King
781114e792 Merge topic 'python3.10'
bb2ebbf241 FindPython{Interp,Libs}: Add support for version 3.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5482
2020-11-10 09:40:54 -05:00
Brad King
15e77fbd40 FortranCInterface: Honor CMAKE_EXE_LINKER_FLAGS under CMP0056
Policy CMP0056 determines whether `CMAKE_EXE_LINKER_FLAGS` are passed
into the test project used by the source-file signature of `try_compile`.
That affects how implicit link directories are detected, so we need to
also honor the policy for the source-directory signature of `try_compile`
used in FortranCInterface in order to get matching link directories.

Fixes: #21408
2020-11-10 09:33:27 -05:00
Miro Hrončok
bb2ebbf241 FindPython{Interp,Libs}: Add support for version 3.10
Extend the change from commit 23cd98a66a (FindPython: Add support of
version 3.10, 2020-10-16, v3.19.0-rc2~25^2) to cover the legacy
`FindPython{Interp,Libs}` modules too.
2020-11-09 11:44:13 -05:00
Haibo Huang
cbc51a8be3 Android: restructure android search paths
1. Set CMAKE_FIND_ROOT_PATH unconditionally.

Revise the implementation from commit a7f41a7ee4 (Android: Fix find_*
search order within NDK for unified toolchains, 2020-10-13).  In the old
implementation, if people set CMAKE_FIND_ROOT_PATH, CMAKE_ANDROID_NDK
won't be added to find root. And all paths added to CMAKE_SYSTEM_*_PATH
below will be rerooted to the user specified root.

2. Add api level specific library path to CMAKE_SYSTEM_PREFIX_PATH.

As the discussion in [1], some people want the paths added by
UnixPaths.cmake. They install their libraries according to
GNUInstallDirs [2].

As a result, we cannot clear CMAKE_SYSTEM_PREFIX_PATH. It includes /usr
so no matter what we specify in CMAKE_SYSTEM_LIBRARY_PATH,
/usr/lib/<arch> will be searched first.

The author also pointed out a way to solve this issue [3]. In addition
to other paths, CMake also searches <root>/<prefix> [4]. So we can add
the API specific lib path to the beginning of CMAKE_SYSTEM_PREFIX_PATH,
to have it searched first.

[1] https://android-review.googlesource.com/c/platform/ndk/+/1486800
[2] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
[3] https://github.com/android/ndk/issues/1179#issuecomment-613435081
[4] 11425041f0/Source/cmSearchPath.cxx (L202)
2020-11-09 08:15:46 -05:00
Brad King
63a1917d09 Merge topic 'FindProtobuf-multiple-extensions'
2bb3c0a44b FindProtobuf: Support files with multiple extensions (#18329)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5476
2020-11-09 08:03:39 -05:00
Brad King
b1bc99d34a Merge topic 'TestBigEndian-use-abi-result'
fcc89bda1d TestBigEndian: Re-implement using byte order detected from ABI check
412ce907a2 Tests: Prepare RunCMake.ABI cases to run more checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5477
2020-11-09 08:01:37 -05:00
Brad King
d0391599a8 Merge topic 'android-flags'
94d87afece Android: allow NDK to control cflags / ldflags
85e5139aba Android: Move *_LLVM_TRIPLE to the centralized table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5461
2020-11-09 07:58:49 -05:00
Florian Franzen
2bb3c0a44b FindProtobuf: Support files with multiple extensions (#18329) 2020-11-06 15:40:54 +01:00
Brad King
fcc89bda1d TestBigEndian: Re-implement using byte order detected from ABI check
Document the module as deprecated in favor of the ABI check results.
2020-11-06 09:17:30 -05:00
Brad King
7b6a9ac8e7 Merge topic 'android-build-type'
3dae826e43 Android: default to RelWithDebInfo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5465
2020-11-06 08:03:27 -05:00
Brad King
5696be33a6 Merge topic 'FindICU-naming'
21cb588629 FindICU: Correct variable names to match documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5451
2020-11-06 08:02:30 -05:00
Brad King
02d6c98210 Merge topic 'cpack-nuget'
41ae7c4e51 CPack/NuGet: Add settings for the license, icon, and language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5415
2020-11-06 08:01:41 -05:00
Brad King
e0438b05de Merge topic 'apple-v4-tbd-file-arch-lookup'
4c6797e03e Apple: Update SDK architecture detection for tbd file version 4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5470
2020-11-06 07:58:55 -05:00
Brad King
b80e39d0f6 Merge topic 'apple-v4-tbd-file-arch-lookup' into release-3.19
4c6797e03e Apple: Update SDK architecture detection for tbd file version 4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5470
2020-11-06 07:58:54 -05:00
Brad King
b065b1ad09 Merge topic 'FindPostgreSQL-13'
f3f09f1c96 FindPostgreSQL: support version 13

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5468
2020-11-06 07:55:48 -05:00
Brad King
0adaed609f Merge topic 'FindPostgreSQL-13' into release-3.19
f3f09f1c96 FindPostgreSQL: support version 13

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5468
2020-11-06 07:55:47 -05:00
Craig Scott
9201b3fa40 Merge topic 'help_ctest_cuda_memcheck'
e620bb7293 Help: Add cuda-memcheck to CTest documentation
fb98883e2b CTest: Add cuda-memcheck to Dart and CTest module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5469
2020-11-06 05:50:53 -05:00
Haibo Huang
94d87afece Android: allow NDK to control cflags / ldflags 2020-11-05 19:45:28 -08:00
Haibo Huang
85e5139aba Android: Move *_LLVM_TRIPLE to the centralized table
This allows us to skip `abi-*.cmake` in the next change.
In the future we may move all this information to the NDK.
2020-11-05 19:45:09 -08:00
Bob Apthorpe
41ae7c4e51 CPack/NuGet: Add settings for the license, icon, and language
Also update the XML Schema.

Fixes: #21348
2020-11-05 10:49:25 -05:00
Tor Arne Vestbø
4c6797e03e Apple: Update SDK architecture detection for tbd file version 4
Extend the `.tbd` parsing from commit 170e598add (iOS: Fix detection of
supported SDK architectures, 2020-04-16, v3.17.2~11^2) to support `.tbd`
file version 4.
2020-11-05 10:21:23 -05:00
Tobias Ribizel
fb98883e2b CTest: Add cuda-memcheck to Dart and CTest module
Issue: #21388
2020-11-05 10:04:44 -05:00
Pavel Cernohorsky
f3f09f1c96 FindPostgreSQL: support version 13 2020-11-05 07:59:45 -05:00
Brad King
d416b0996a Merge topic 'GNUInstallDirs-dir'
a61007b3b0 Tests: Add RunCMake.GNUInstallDirs case for get_absolute_install_dir
229b5ee994 GNUInstallDirs: Add dir argument to GNUInstallDirs_get_absolute_install_dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5450
2020-11-05 07:56:30 -05:00