Commit Graph

793 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
c8f13bcb41 Merge topic 'gnu_c23' into release-3.21
d61bc4241d GNU: Correct C23 flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6376
2021-07-23 09:40:35 -04:00
Brad King
bd00c0e819 Merge topic 'gnu_c23'
d61bc4241d GNU: Correct C23 flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6376
2021-07-23 09:40:35 -04:00
Brad King
76fa10133d Merge topic 'iar-binutils'
5b9bfe738c IAR: Moved search logic to BinUtils.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6372
2021-07-23 09:27:28 -04:00
Jean-Marc Hengen
5b9bfe738c IAR: Moved search logic to BinUtils.
The search logic for the IAR linker, librarian and related tools is
moved from `Modules/Compiler/IAR-FindBinUtils.cmake` to
`Modules/CMakeFindBinUtils.cmake` by introducing an new elseif block
for the IAR toolchain.

The search logic was refactored to omit repeating itself.

Fixes: #22425
2021-07-23 14:34:26 +02:00
Raul Tambre
d61bc4241d GNU: Correct C23 flags
Non-final forms aren't supported yet, unlike C++23.
Seems I might've gotten confused due to that when I added these.

Fixes #22453.
2021-07-21 20:25:02 +03:00
Brad King
31ecd37180 Merge topic 'iar-exe-suffix' into release-3.21
09bc0785ee Help: Document CMAKE_EXECUTABLE_SUFFIX_<LANG> explicitly
05a3bafe65 Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6357
2021-07-20 11:56:01 -04:00
Brad King
f7d82cb6f7 Merge topic 'iar-exe-suffix'
09bc0785ee Help: Document CMAKE_EXECUTABLE_SUFFIX_<LANG> explicitly
05a3bafe65 Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6357
2021-07-20 11:56:01 -04:00
Brad King
0a63927b6d Merge topic 'iar-host-exe'
1c66012f8e Compiler/IAR: search for both IAR's binaries * and *.exe

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6362
2021-07-20 11:55:05 -04:00
Lorenzo Cappelletti
05a3bafe65 Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIX
Use `CMAKE_EXECUTABLE_SUFFIX_<LANG>` instead.

Fixes: #22426
2021-07-20 11:51:19 -04:00
Lorenzo Cappelletti
1c66012f8e Compiler/IAR: search for both IAR's binaries * and *.exe
IAR is available for both Linux and Windows OSes.  Moreover,
binaries `*.exe` could be called from a Linux box, or vice versa.
See also commit 01a4eec446 (IAR: Changes required for Linux,
2019-04-25, v3.15.0-rc1~185^2).

Fixes: #22312
2021-07-20 11:50:09 -04:00
Brad King
f166d32576 Merge topic 'armlink_armar_detection'
509ef50a06 ARMClang: Fix regression in check for working compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6346
2021-07-14 10:06:29 -04:00
Lingkai Dong
509ef50a06 ARMClang: Fix regression in check for working compiler
Given the compiler to use, `CMakeFindBinUtils.cmake` automatically
determines a number of tools including linker (CMAKE_LINKER) and archiver
(CMAKE_AR) and stores them in a generated file `CMakeCCompiler.cmake` as
non-CACHE entries. The compiler-specific ARMClang.cmake then tries to
override CMAKE_LINKER and CMAKE_AR as CACHE entries.

Following the introduction of CMP0126, which is set to NEW in the test
for a working compiler, setting a CACHE entry does not replace a normal
entry of the same name anymore, resulting in a failed test due to wrong
linker and archiver.

To fix this, set CMAKE_LINKER and CMAKE_AR for ARMClang directly in
`CMakeFindBinUtils.cmake` as is done for other compilers.  Check
for them in `ARMClang.cmake` to safeguard cases when a project explicitly
includes `ARMClang.cmake` prior to compiler determination (which some
projects do to work around other problems in older CMake versions).
2021-07-14 09:45:09 -04:00
Brad King
c9cd039e5f Merge topic 'LWYU-externalization'
14e57e9637 LINK_WHAT_YOU_USE feature: externalize configuration
9c5132a586 PGI: Fix "LINKER:" prefix generated separator
8a93de080c cmGeneratorTarget: Add method for LINKER: prefix translation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6306
2021-07-12 08:43:32 -04:00
Marc Chevrier
9c5132a586 PGI: Fix "LINKER:" prefix generated separator
Fix a typo from commit 66ea1a3795 (LINK_OPTIONS: Add support of "LINKER:" prefix,
2018-04-30, v3.13.0-rc1~437^2).
2021-07-09 14:49:01 +02:00
Brad King
1ec39e9bd6 Merge topic 'iar-linker-placeholder'
bf810c75ac IAR: Use placeholders in linker and archiver rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6322
2021-07-08 09:32:41 -04:00
Jean-Marc Hengen
bf810c75ac IAR: Use placeholders in linker and archiver rules
Update the IAR linker and archiver rules to use the `<CMAKE_LINKER>`
and `<CMAKE_AR>` placeholders instead of hard-coding the tool names.

Fixes: #22395
2021-07-08 08:08:52 -04:00
Brad King
7b942e5068 Merge topic 'intel-oneapi-std-windows'
13961f3b43 Merge branch 'backport-3.20-intel-oneapi-std-windows'
5115dd1e2c IntelLLVM: Fix C/C++ standard level flags on Windows
84036d30d4 IntelLLVM: Fix C/C++ standard level flags on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6319
2021-07-08 07:36:57 -04:00
Brad King
84036d30d4 IntelLLVM: Fix C/C++ standard level flags on Windows
In commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based
compilers, 2020-11-02, v3.20.0-rc1~89^2~20) we accidentally left out
activation of the C/C++ standard level selection logic when IntelLLVM is
targeting the MSVC ABI.

Fixes: #22388
2021-07-07 12:24:36 -04:00
Brad King
d4a0d59472 Merge topic 'fujitsu-clang-findbinutils'
6ce97c2248 FujitsuClang: Change LTO option from -flto=thin to -flto
3a0effcd16 FujitsuClang: Set CMAKE_<LANG>_COMPILER_AR and CMAKE_<LANG>_COMPILER_RANLIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6281
2021-06-30 07:31:39 -04:00
Yuichiro Utsumi
6ce97c2248 FujitsuClang: Change LTO option from -flto=thin to -flto
Since -flto=thin is not supported officially in FujitsuClang,
change to -flto.
2021-06-29 09:31:53 -04:00
Yuichiro Utsumi
3a0effcd16 FujitsuClang: Set CMAKE_<LANG>_COMPILER_AR and CMAKE_<LANG>_COMPILER_RANLIB
Fixes: #22337
2021-06-29 09:31:53 -04:00
Brad King
5840c3eab7 Merge topic 'fujitsu-ipo'
96e362fdc9 Fujitsu: Add IPO support for Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6261
2021-06-25 07:23:58 -04:00
Paul Zehner
96e362fdc9 Fujitsu: Add IPO support for Fortran 2021-06-24 09:02:15 -04:00
Ben Boeckel
f29e1874ad Compiler/MSVC: use the -external:I flag for system includes
See: #17904
2021-06-18 09:54:17 -04:00
Brad King
b642022046 AppleClang: Add flags for C17 and C23
Follow up commit 72f4984cdc (Clang: C23 support, 2021-02-07).
2021-06-16 15:50:55 -04:00
Gregor Jasny
e8dc95ae1e ObjectiveC: Add C17 and C23 support
Issue: #22297
2021-06-11 14:47:23 +02:00
Robert Maynard
947dbed0aa HIP: Automatically inject the hip::device runtime target
Any target that might need to link to hip code needs the `hip::device`
target
2021-06-07 19:25:33 +00:00
Robert Maynard
b50bfc8913 HIP: Add language to CMake 2021-06-07 19:25:33 +00:00
Robert Maynard
bd844387df ROCMClang: Add the ROCm toolkit derived clang compiler to CMake 2021-06-07 19:25:28 +00:00
Brad King
b25225bb61 Merge topic 'msvc_cxx20_23'
886e27062b Clang/MSVC: C++20 final flag, C++23 support
3aaf1d91bf MSVC: C++20 final flag, C++23 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !6174
2021-06-02 07:32:30 -04:00
Raul Tambre
886e27062b Clang/MSVC: C++20 final flag, C++23 support
Added in LLVM commit a8f75d497daa2684a03909d7c31d5bce11b427e1, will be released
in 13.0.
2021-05-29 19:44:10 +03:00
Brad King
f530b3a267 OpenWatcom: Add infrastructure to link to object files 2021-05-29 09:28:36 -04:00
Raul Tambre
3aaf1d91bf MSVC: C++20 final flag, C++23 support
Microsoft intends to ship the final C++20 flag in VS 16.11 albeit with a few
parts missing due planned ABI breaking changes.
The current 16.11 Preview 1 toolchain version is 19.29.30129.3, so let's
restrict based on that.
2021-05-29 13:35:45 +03:00
Brad King
995f5b4e7b BinUtils: Find linker and librarian for OpenWatcom
Update our OpenWatcom linker and archiver rules to use the
`<CMAKE_LINKER>` and `<CMAKE_AR>` placeholders instead of
hard-coding the tool names.
2021-05-27 10:46:33 -04:00
Josef Angstenberger
74a2a7a477 Compiler/TI: Restore response file usage for linker
The commit 98fea8205e (Compiler/TI: Avoid response file usage for
linker, 2020-07-11, v3.19.0-rc1~495^2) disabled linker file usage by
default.  The previous settings were working, even if not for all cases.
Restore them and add an explanation in a comment.

Issue: #22233
2021-05-25 10:10:42 -04:00
Brad King
b78ba8bd31 Merge topic 'nvhpc-ninja-depfile'
364f6af1d7 NVHPC: Support Ninja dependency scanning
521cfc38a3 NVHPC: Support explicit language flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6136
2021-05-19 07:54:42 -04:00
Brad King
c23e2fa0c5 Merge topic 'nvhpc-ninja-depfile' into release-3.20
364f6af1d7 NVHPC: Support Ninja dependency scanning
521cfc38a3 NVHPC: Support explicit language flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6136
2021-05-19 07:54:41 -04:00
Robert Maynard
364f6af1d7 NVHPC: Support Ninja dependency scanning
Fixes: #22168
2021-05-18 12:56:46 -04:00
Robert Maynard
521cfc38a3 NVHPC: Support explicit language flags 2021-05-18 11:30:01 -04:00
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