summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | GNU: Correct C23 flagsRaul Tambre2021-07-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge topic 'iar-binutils'Brad King2021-07-232-86/+0
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | 5b9bfe738c IAR: Moved search logic to BinUtils. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6372
| * | | IAR: Moved search logic to BinUtils.Jean-Marc Hengen2021-07-232-86/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Merge topic 'iar-exe-suffix' into release-3.21Brad King2021-07-201-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | \ \ Merge topic 'iar-exe-suffix'Brad King2021-07-201-2/+2
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | 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
| * | | Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIXLorenzo Cappelletti2021-07-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use `CMAKE_EXECUTABLE_SUFFIX_<LANG>` instead. Fixes: #22426
* | | | Merge topic 'iar-host-exe'Brad King2021-07-201-8/+24
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | 1c66012f8e Compiler/IAR: search for both IAR's binaries * and *.exe Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6362
| * | | Compiler/IAR: search for both IAR's binaries * and *.exeLorenzo Cappelletti2021-07-201-8/+24
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'armlink_armar_detection'Brad King2021-07-141-11/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | 509ef50a06 ARMClang: Fix regression in check for working compiler Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6346
| * | ARMClang: Fix regression in check for working compilerLingkai Dong2021-07-141-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | Merge topic 'LWYU-externalization'Brad King2021-07-121-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | PGI: Fix "LINKER:" prefix generated separatorMarc Chevrier2021-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | Fix a typo from commit 66ea1a3795 (LINK_OPTIONS: Add support of "LINKER:" prefix, 2018-04-30, v3.13.0-rc1~437^2).
* | | | Merge topic 'iar-linker-placeholder'Brad King2021-07-081-7/+7
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | bf810c75ac IAR: Use placeholders in linker and archiver rules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6322
| * | IAR: Use placeholders in linker and archiver rulesJean-Marc Hengen2021-07-081-7/+7
| | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'intel-oneapi-std-windows'Brad King2021-07-082-10/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | 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
| * | IntelLLVM: Fix C/C++ standard level flags on WindowsBrad King2021-07-072-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'fujitsu-clang-findbinutils'Brad King2021-06-302-0/+9
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | 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
| * | FujitsuClang: Change LTO option from -flto=thin to -fltoYuichiro Utsumi2021-06-291-0/+3
| | | | | | | | | | | | | | | Since -flto=thin is not supported officially in FujitsuClang, change to -flto.
| * | FujitsuClang: Set CMAKE_<LANG>_COMPILER_AR and CMAKE_<LANG>_COMPILER_RANLIBYuichiro Utsumi2021-06-291-0/+6
| | | | | | | | | | | | Fixes: #22337
* | | Merge topic 'fujitsu-ipo'Brad King2021-06-251-0/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | 96e362fdc9 Fujitsu: Add IPO support for Fortran Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6261
| * | Fujitsu: Add IPO support for FortranPaul Zehner2021-06-241-0/+10
| | |
* | | Compiler/MSVC: use the `-external:I` flag for system includesBen Boeckel2021-06-182-0/+12
|/ / | | | | | | See: #17904
* | AppleClang: Add flags for C17 and C23Brad King2021-06-161-1/+11
| | | | | | | | Follow up commit 72f4984cdc (Clang: C23 support, 2021-02-07).
* | ObjectiveC: Add C17 and C23 supportGregor Jasny2021-06-112-1/+27
| | | | | | | | Issue: #22297
* | HIP: Automatically inject the `hip::device` runtime targetRobert Maynard2021-06-072-0/+8
| | | | | | | | | | Any target that might need to link to hip code needs the `hip::device` target
* | HIP: Add language to CMakeRobert Maynard2021-06-073-0/+77
| |
* | ROCMClang: Add the ROCm toolkit derived clang compiler to CMakeRobert Maynard2021-06-078-0/+85
| |
* | Merge topic 'msvc_cxx20_23'Brad King2021-06-022-4/+20
|\ \ | |/ | | | | | | | | | | | | | | | | 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
| * Clang/MSVC: C++20 final flag, C++23 supportRaul Tambre2021-05-291-3/+12
| | | | | | | | | | Added in LLVM commit a8f75d497daa2684a03909d7c31d5bce11b427e1, will be released in 13.0.
| * MSVC: C++20 final flag, C++23 supportRaul Tambre2021-05-291-1/+8
| | | | | | | | | | | | | | 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.
| * Merge topic 'nvhpc-ninja-depfile' into release-3.20Brad King2021-05-192-0/+18
| |\ | | | | | | | | | | | | | | | | | | | | | 364f6af1d7 NVHPC: Support Ninja dependency scanning 521cfc38a3 NVHPC: Support explicit language flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6136
* | | OpenWatcom: Add infrastructure to link to object filesBrad King2021-05-291-0/+1
| | |
* | | BinUtils: Find linker and librarian for OpenWatcomBrad King2021-05-271-5/+5
| | | | | | | | | | | | | | | | | | Update our OpenWatcom linker and archiver rules to use the `<CMAKE_LINKER>` and `<CMAKE_AR>` placeholders instead of hard-coding the tool names.
* | | Compiler/TI: Restore response file usage for linkerJosef Angstenberger2021-05-251-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'nvhpc-ninja-depfile'Brad King2021-05-192-0/+18
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 364f6af1d7 NVHPC: Support Ninja dependency scanning 521cfc38a3 NVHPC: Support explicit language flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6136
| * | NVHPC: Support Ninja dependency scanningRobert Maynard2021-05-182-0/+10
| | | | | | | | | | | | Fixes: #22168
| * | NVHPC: Support explicit language flagsRobert Maynard2021-05-182-0/+8
| | |
* | | Merge topic 'cpp23_gcc'Brad King2021-05-111-2/+7
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | 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
| * | GNU: C++23 supportRaul Tambre2021-05-101-0/+2
| | | | | | | | | | | | | | | | | | | | | Added in GCC commit 78739c2df788ee5c868d998a6333d453317d8711, released in 11.1. No lettered variant beforehand this time around. Implements #22139.
| * | GNU: Final C++20 flagsRaul Tambre2021-05-101-1/+4
| | | | | | | | | | | | Added in GCC commit fb26050409473f5be54465beca114b7e48de43aa, released in 11.1.
| * | GNU: C++17 default versionRaul Tambre2021-05-101-1/+1
| |/ | | | | | | Changed in GCC commit 0801f419440c14f6772b28f763ad7d40f7f7a580, released in 11.1.
* | Modules: Fix typos and spelling in comments of generated codeJosef Angstenberger2021-05-071-1/+1
| |
* | Fujitsu: Make explicit Fortran preprocessing under Ninja more robustEisuke Kawashima2021-05-061-1/+1
| | | | | | | | | | | | | | | | | | 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
* | Merge topic 'intel-2021'Brad King2021-04-291-7/+16
|\ \ | |/ | | | | | | | | | | | | 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
| * Intel: Update Classic compiler version detection for 2021Brad King2021-04-281-7/+16
| | | | | | | | | | | | | | The value of the `__INTEL_COMPILER` macro changed convention starting in version 2021. Fixes: #22120
* | Merge topic 'ARMClang-cpu-arch-flags'Brad King2021-04-281-26/+46
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | ARMClang: Do not automatically add cpu/arch compile or link optionsLingkai Dong2021-04-271-26/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | ARMClang: Separate cpu/arch flags from preceding flagsBrad King2021-04-271-3/+3
| | | | | | | | | | | | Suggested-by: Kim Kryger
* | | CUDA: Add CMAKE_CUDA_HOST_COMPILER support on Windows non-VS generatorsunknown2021-04-221-9/+5
|/ /
* | Fujitsu: Fix C90 standard flagsPaul Zehner2021-04-141-3/+3
| | | | | | | | | | Fix typos from commit 3c867cff4a (Fujitsu: Add support for the Fujitsu compiler in Trad mode, 2020-12-22).