Commit Graph

11869 Commits

Author SHA1 Message Date
Brad King
cf90aa5595 Merge topic 'host-distro-info'
b9698f89df cmake_host_system_information: Make it available for all systems
5469c71a82 Refactor: Simplify `GetValue()` function calls
6c92f80f2e cmake_host_system_information: Also set `USED_FALLBACK_SCRIPT`
efe139d1b8 cmake_host_system_information: Can run fallback scripts
1e65e4a6e5 cmake_host_system_information: Can read `/etc/os-release` file
e808cbb1dd Testing: Convert `cmake_host_system_information` tests into `RunCMake`
9e831284e5 Documentation: Use definition list instead of tables
346f3de005 Refactor: Deduplicate code for `VS_nn_DIR` keys processing
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6410
2021-08-24 10:04:15 -04:00
Brad King
38dbf18bb1 Merge topic 'FindMPI-framework-not-a-compile-flag'
2b2a6a7170 FindMPI: do not detect `-framework` as a compile flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !6467
2021-08-24 09:54:58 -04:00
Craig Scott
600ca2ab1a Merge topic 'FetchContent_doc_restructure'
e802193a34 Help: Rework docs to prioritize FetchContent_MakeAvailable()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6475
2021-08-24 08:33:15 -04:00
Craig Scott
e802193a34 Help: Rework docs to prioritize FetchContent_MakeAvailable()
FetchContent_MakeAvailable() should be strongly preferred over
the direct use of FetchContent_Populate(). The latter was the only
method available before CMake 3.14, but the former is simpler and
offers more functionality. Restructure the docs and improve the
wording to steer the reader toward `FetchContent_MakeAvailable()`
as the preferred approach.

Also take the opportunity to pull out the variables that influence
behavior into their own section. They were easily missed when
buried in the docs for the FetchContent_Populate() command.
2021-08-23 21:47:03 +10:00
Alex Turbov
efe139d1b8 cmake_host_system_information: Can run fallback scripts 2021-08-20 09:35:12 -04:00
Ben Boeckel
2b2a6a7170 FindMPI: do not detect -framework as a compile flag
MPICH 3.4.2 now reports `-framework OpenCL` as one of its compilation
flag. The compile flag extraction is seeing it as a generic `-f` flag
and misses its argument. This ends up with a compile option of
`-framework` which eats the next flag (and may be very important).

It does not seem that passing `-framework` as a link flag is necessary
at this time, so that is being actively ignored for now.

Fixes: #22555
2021-08-19 13:09:39 -04:00
Brad King
2a4a630f3a Merge topic 'help_check'
d62d0f048f Help: CheckFortranFunctionExists: recommend more general CheckSourceCompiles
8fddc2bb2f Help: refer to CheckSourceCompiles instead of older

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6446
2021-08-19 10:31:25 -04:00
Brad King
135e79038c Merge topic 'FindPkgConfig-restore-legacy-behavior'
17e4934dbf FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6461
2021-08-19 10:27:24 -04:00
Brad King
30dd9b33a0 Merge topic 'FindPkgConfig-restore-legacy-behavior' into release-3.21
17e4934dbf FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6461
2021-08-19 10:27:23 -04:00
Brad King
76f1c9d598 Merge topic 'binutils-clang-fallback-ld'
788b7afff2 FindBinUtils: Fall back to ld for Clang without lld

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6457
2021-08-19 10:26:18 -04:00
Brad King
daeb4f0f50 Merge topic 'binutils-clang-fallback-ld' into release-3.21
788b7afff2 FindBinUtils: Fall back to ld for Clang without lld

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6457
2021-08-19 10:26:17 -04:00
Brad King
a7daf30070 Merge topic 'CheckLanguage-CMP0126' into release-3.21
89ed11ae6f CheckLanguage: Avoid CMP0126 warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6462
2021-08-19 10:25:15 -04:00
Brad King
4aaddce2be Merge topic 'CheckLanguage-CMP0126'
89ed11ae6f CheckLanguage: Avoid CMP0126 warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6462
2021-08-19 10:25:15 -04:00
Brad King
5dc9f53f50 Merge topic 'android-macos-arm64'
164643fc39 Android: Fix NDK toolchain dir on arm64 mac

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6449
2021-08-19 10:23:31 -04:00
Brad King
89ed11ae6f CheckLanguage: Avoid CMP0126 warning
The macro's implementation converts a normal variable into a cache
variable intentionally, so both are set.  Explicitly set CMP0126 to NEW
to avoid a warning in trace mode.  This won't affect the module behavior
because the code path does not activate if a normal variable is already
defined anyway.

Fixes: #22548
2021-08-18 15:25:49 -04:00
Marc Chevrier
17e4934dbf FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEW
Module behavior must be independent from `CMP0126` policy.

Fixes: #22526
2021-08-18 14:51:50 -04:00
Thomas Bernard
788b7afff2 FindBinUtils: Fall back to ld for Clang without lld
If `lld` is not available, Clang can still use `ld`.

Fixes: #22500
2021-08-18 14:31:21 -04:00
WangBin
164643fc39 Android: Fix NDK toolchain dir on arm64 mac 2021-08-18 14:09:33 -04:00
Michael Hirsch
d62d0f048f Help: CheckFortranFunctionExists: recommend more general CheckSourceCompiles
CheckFortranFunctionExists is really only relevant to Fortran 77 code.
Fortran 90 and newer users should use CheckSourceCompiles instead.
2021-08-11 13:44:43 -04:00
Michael Hirsch
8fddc2bb2f Help: refer to CheckSourceCompiles instead of older 2021-08-11 13:39:44 -04:00
Brad King
82828401b0 Merge topic 'armclang-compiler-deps'
7ef5255e1e armclang: activate compiler dependencies generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6433
2021-08-10 09:27:29 -04:00
Brad King
1b3d892ac2 Merge topic 'GoogleTest-gtest-filter'
ea6a7dd1c2 GoogleTest: Add TEST_FILTER arg to gtest_discover_tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6406
2021-08-10 09:26:49 -04:00
Brad King
81aef41569 Merge topic 'binutils-no-cmake-paths' into release-3.21
fc1f733cc7 BinUtils: Avoid searching CMAKE_PREFIX_PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6434
2021-08-10 09:22:52 -04:00
Brad King
25b6cf4f35 Merge topic 'binutils-no-cmake-paths'
fc1f733cc7 BinUtils: Avoid searching CMAKE_PREFIX_PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6434
2021-08-10 09:22:52 -04:00
Cristian Adam
fc1f733cc7 BinUtils: Avoid searching CMAKE_PREFIX_PATH
Our `find_program` calls specify `HINTS` to look in the toolchain's
directory first, and then in `PATH`.  `CMAKE_PREFIX_PATH` may be
specified by the user to help find packages for project dependencies,
but this should not override the binutils.

Fixes: #22512
2021-08-09 09:59:29 -04:00
Brad King
b5c4b70290 Merge topic 'nvhpc_support_new_c_and_c++_standards' into release-3.21
9ac426e460 NVHPC-C: Add support for C17
f5dbc27c27 NVHPC-CXX: Add support for C++20

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !6430
2021-08-09 09:36:58 -04:00
Brad King
bd74ac95f1 Merge topic 'nvhpc_support_new_c_and_c++_standards'
9ac426e460 NVHPC-C: Add support for C17
f5dbc27c27 NVHPC-CXX: Add support for C++20

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !6430
2021-08-09 09:36:58 -04:00
Brad King
50df0c411d Merge topic 'macos-10.4'
1af23c4de2 macOS: Restore support for Mac OS X 10.4 (Tiger)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6426
2021-08-06 10:48:21 -04:00
Brad King
ea8fc62194 Merge topic 'macos-10.4' into release-3.21
1af23c4de2 macOS: Restore support for Mac OS X 10.4 (Tiger)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6426
2021-08-06 10:48:20 -04:00
Marc Chevrier
7ef5255e1e armclang: activate compiler dependencies generation 2021-08-06 14:01:02 +02:00
Robert Maynard
9ac426e460 NVHPC-C: Add support for C17 2021-08-05 16:19:23 -04:00
Robert Maynard
f5dbc27c27 NVHPC-CXX: Add support for C++20 2021-08-05 16:19:12 -04:00
Ashish Sadanandan
ea6a7dd1c2 GoogleTest: Add TEST_FILTER arg to gtest_discover_tests
The `TEST_FILTER` argument can be used to filter tests during the
discovery phase. It combines `--gtest_filter=<expr>` with the
`--gtest_list_tests` argument when invoking the test excutable for
listing defined tests.

Fixes: #17493
2021-08-05 00:43:17 -06:00
Brad King
792c2eac10 Merge topic 'irsl-intel'
f4c194398d IRSL: Avoid duplication of Intel redist lib folder paths
2adc45c7f6 IRSL: Fix check of path to Intel redistdir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6414
2021-08-03 11:09:42 -04:00
Brad King
a3ddcdb911 Merge topic 'nsis_ignore_license_page'
795e406e3b CPack/NSIS: Add option to not display license page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6422
2021-08-03 11:06:45 -04:00
Brad King
6edf3133ad Merge topic 'FindX11-more-advanced-variables'
076d0a1710 FindX11: mark more xcb variables as advanced

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6424
2021-08-03 11:03:35 -04:00
Brad King
64e8d23caf Merge topic 'gate-vtk-compat'
7391363302 VTKCompatibility: ignore for "modern" VTK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6413
2021-08-03 11:02:23 -04:00
Brad King
a6eadb8031 Merge topic 'cpack-rpm-pre-semicolon'
3cdf23985f CPackRPM: avoid a spurious `;` in the `%pre` and other sections with scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6415
2021-08-03 11:01:08 -04:00
Evan Miller
1af23c4de2 macOS: Restore support for Mac OS X 10.4 (Tiger)
Since commit 4aed96e230 (Apple: Set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG
on non-macOS too, 2021-04-06, v3.20.1~5^2) we always enable support for
linking with `-rpath`.  The intention of the change was to enable using
the flag on iOS, tvOS and watchOS by avoiding a Darwin-specific version
check.  However, removing the check broke support for OS X 10.4 because
the flag is not supported on that version.

Restore a form of the check that disables the flag on OS X < 10.5 while
still allowing it for the other Apple platforms.  Since no one is doing
iOS/tvOS/etc development on 10.4, this change should have no unintended
side effects.

Fixes: #22490
2021-08-02 16:12:14 -04:00
Alexander Grund
f4c194398d IRSL: Avoid duplication of Intel redist lib folder paths 2021-08-02 15:34:19 -04:00
Alexander Grund
2adc45c7f6 IRSL: Fix check of path to Intel redistdir
Fix a cut-n-paste error from commit fd4406f33e (IRSL: Add Intel compiler
support, 2017-08-16, v3.10.0-rc1~187^2).  Make the checked and used
paths match.
2021-08-02 15:34:09 -04:00
Brad King
0660dc4dcf Merge topic 'find_cudatoolkit_understand_nvhpc_math_library_location'
d856aaa37d FindCUDAToolkit: Understand NVHPC versioned math library layout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6405
2021-08-02 15:09:43 -04:00
Artur Samarin
3cdf23985f CPackRPM: avoid a spurious ; in the %pre and other sections with scripts
This was accidentally added by commit 34c8a23044 (CPackRPM: add
scriplets tags only if scripts exist, 2021-04-01, v3.21.0-rc1~387^2).

Fixes: #22501
2021-08-02 15:04:22 -04:00
Brad King
b65378878b Merge topic 'nvhpc-MD-flag'
7ce718376c NVHPC: Support 21.07 change to '-MD' where it behaves like gcc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6408
2021-08-02 14:05:34 -04:00
Ben Boeckel
7391363302 VTKCompatibility: ignore for "modern" VTK
Modern versions which use the module system really don't need any of the
hacks needed here.
2021-08-02 10:45:31 -04:00
Ben Boeckel
076d0a1710 FindX11: mark more xcb variables as advanced 2021-08-02 10:40:57 -04:00
Johnny Jazeix
795e406e3b CPack/NSIS: Add option to not display license page
Fixes: #22215
2021-08-01 18:28:47 +02:00
Robert Maynard
7ce718376c NVHPC: Support 21.07 change to '-MD' where it behaves like gcc 2021-07-29 10:43:54 -04:00
Brad King
1d12ea35c6 Merge topic 'haiku-platform'
a1261ce917 Platform/Haiku: Remove the include-once behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6401
2021-07-29 08:46:47 -04:00
Jessica Hamilton
a1261ce917 Platform/Haiku: Remove the include-once behavior
The behavior was added by commit 7ebc1cb2ff (Haiku: Several fixes to
platform module, 2013-10-05, v3.0.0-rc1~541^2~3), but was not explained
in its commit message.  No other platform modules do this.

The include-once behavior results in incorrect variables set in some
larger projects, e.g. .NET Core, particularly when cross-compiling,
`CMAKE_DL_LIBS` being one of these.  Remove it.
2021-07-29 08:42:46 -04:00