Commit Graph

11893 Commits

Author SHA1 Message Date
Brad King
085719d4d8 Merge topic 'iwyu-cl'
ccfe1b0b40 IWYU: Add `--driver-mode=cl` when applicable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6511
2021-09-14 09:36:13 -04:00
Brad King
2a8d9bf4cc Merge topic 'CMakeDependentOption-condition-syntax'
059b90a0b4 CMakeDependentOption: Introduce policy CMP0127 for full Condition Syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6493
2021-09-14 09:35:07 -04:00
Brad King
036f41e45f Merge topic 'CMakeFindPackageMode-sysroot'
8defe3380e CMakeFindPackageMode: Honor CMAKE_SYSROOT to detect lib64 platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6513
2021-09-14 09:33:55 -04:00
PigeonF
ccfe1b0b40 IWYU: Add --driver-mode=cl when applicable
We already do this for `clang-tidy`.

Fixes: #16554
2021-09-10 09:53:31 -04:00
Daniel Schürmann
059b90a0b4 CMakeDependentOption: Introduce policy CMP0127 for full Condition Syntax
Fixes: #22303
2021-09-10 09:46:55 -04:00
Brad King
72c4f1281e Merge topic 'icu-advanced'
cdd2714dfa FindICU: Really mark variables as advanced

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6507
2021-09-10 09:32:26 -04:00
Brad King
c8605bfd45 Merge topic 'clang_msvc_frontend_detection_for_asm'
c9c79dde41 Clang: Add MSVC frontend detection for the ASM compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6481
2021-09-10 09:31:00 -04:00
Marc Chevrier
dc971e7da4 Merge topic 'thread-typos'
d897391782 Fix typo in comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Arcturus <arcturus102@outlook.com>
Merge-request: !6504
2021-09-10 04:34:09 -04:00
Pablo Romero
8defe3380e CMakeFindPackageMode: Honor CMAKE_SYSROOT to detect lib64 platforms
Add `CMAKE_SYSROOT` to check the full path on host OS. In a
non-crosscompiling use case, the call to `CMAKE_SYSROOT` is empty.

Fixes: #22608
2021-09-09 15:55:26 -04:00
Thomas Bernard
c9c79dde41 Clang: Add MSVC frontend detection for the ASM compiler
Fixes: #22495
2021-09-09 14:26:44 -04:00
Marc Chevrier
88ea6cb292 Merge topic 'FindPyhton-homebew-on-Mac-M1'
2636ad5045 FindPython: Ensure homebrew on Mac M1 is used

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6499
2021-09-07 05:18:55 -04:00
Mathieu Malaterre
cdd2714dfa FindICU: Really mark variables as advanced 2021-09-06 15:09:31 +02:00
Mattias Ellert
d897391782 Fix typo in comment
The comment lists -lpthread twice, when "-lpthreads, -lpthread" is meant.
Also the grammar (did not found) is incorrect.
2021-09-06 06:54:51 +02:00
Brad King
6059996467 Merge topic 'vs2022'
38c8f2c4e3 IRSL: Add discovery of VS 2022 v143 toolset redistributables
f01ea7e391 MSVC: Fix MSVC_TOOLSET_VERSION for VS 2022 v143 toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6497
2021-09-03 10:18:50 -04:00
Brad King
a2c3ef9379 Merge topic 'FindBoost-1.77'
1ad0c5ae53 FindBoost: Add support for Boost 1.77

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6494
2021-09-03 10:17:35 -04:00
Marc Chevrier
2636ad5045 FindPython: Ensure homebrew on Mac M1 is used
Fixes: #22581
2021-09-03 14:59:52 +02:00
Brad King
38c8f2c4e3 IRSL: Add discovery of VS 2022 v143 toolset redistributables
Fixes: #22586
2021-09-02 13:47:46 -04:00
Brad King
f01ea7e391 MSVC: Fix MSVC_TOOLSET_VERSION for VS 2022 v143 toolset
This was forgotten in commit 0c7f918fb1 (VS: Update Visual Studio 17
2022 generator for Preview 2, 2021-07-14, v3.21.1~29^2) when the toolset
was first renumbered to `v143`.

Fixes: #22585
2021-09-02 13:47:42 -04:00
Brad King
1ad0c5ae53 FindBoost: Add support for Boost 1.77
Update the list of known versions.

Run the command

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

to extract dependencies from the 1.77.0 source tree.  The dependencies
differ from those of 1.76: the `contract`, `thread`, and `wave`
components no longer depend on `date_time`.  The `math` component no
longer depends on `atomic`.

Fixes: #22588
2021-09-02 12:43:43 -04:00
Brad King
67d0d8b9d5 Merge topic 'darwin-wmake-jwasm-support'
bf09145eb0 Enable Watcom WMake generator on Darwin
78f758a463 Use dashes for MASM flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6472
2021-08-25 09:18:11 -04:00
Brad King
78eff650fa Merge topic 'GNUInstallDirs-variable-named-0'
49a5dbcaff GNUInstallDirs: avoid unwanted variable dereference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6474
2021-08-25 09:12:23 -04:00
Brad King
eae5533ab3 Merge topic 'GNUInstallDirs-variable-named-0' into release-3.21
49a5dbcaff GNUInstallDirs: avoid unwanted variable dereference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6474
2021-08-25 09:12:22 -04:00
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
Ben Boeckel
49a5dbcaff GNUInstallDirs: avoid unwanted variable dereference
In some situations, it seems that the variable `0` is defined. In the
case found, it was set to `1`. This makes the detection of the missing
third argument bogus and unnecessarily triggers a warning.

This oversight was introduced in 229b5ee994 (GNUInstallDirs: Add dir
argument to GNUInstallDirs_get_absolute_install_dir, 2020-10-31) prior
to CMake 3.20's release cycle.
2021-08-22 12:42:48 -04:00
Bradley Bell
78f758a463 Use dashes for MASM flags
Microsoft's tools traditionally uses slashes, but accept dashes as
well. If we use dashes, it becomes possible to use an alternative
MASM-compatible assembler such as JWasm.
2021-08-20 20:28:37 -07: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