summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* IntelLLVM: Avoid unnecessary -Qstd=c++11 flag on WindowsBrad King2023-01-121-2/+2
| | | | | | | | The IntelLLVM compiler, for compatibility with MSVC on Windows, always runs with support for at least C++14. The `-Qstd=c++11` flag just causes a warning that it is unused. Fixes: #24316
* CUDA: Add support for cuda_std_20 for nvcc 12.0+Robert Maynard2022-12-131-0/+12
| | | | CUDA 12.0 has been released with support for `-std=c++20`.
* MSVC: don't opt into dyndep supportBen Boeckel2022-11-281-1/+0
| | | | | | | Instead, just set the variables for how scanning works since that is part of the compiler mechanisms. Fixes: #24198
* msvc: bless MSVC 19.34 support for C++ modules as experimentalBen Boeckel2022-11-111-0/+12
| | | | Visual Studio 17.4 now contains official support for what CMake needs.
* Tasking: Remove CMAKE_SYSTEM_PROCESSOR support per CMP0123Christoph Seitz2022-11-071-32/+0
| | | | | | | Architecture specific compile options should be set through toolchain files. Fixes: #24115
* Tasking: Fix PIC option for Tasking ToolsetGordon Jess2022-11-031-1/+1
| | | | Fixes: #24114
* IAR: Restore support for CMAKE_CXX_FLAGS_INITDaniel Schürmann2022-11-011-2/+2
| | | | | | | | | | | | Prior to commit a9073db736 (IAR: update language specification detection, 2021-09-23, v3.22.0-rc1~83^2) the `--c++`/`--eec++` flags were stored in `CMAKE_IAR_CXX_FLAG` so that they would be used as part of the `CMAKE_CXX_COMPILE_OBJECT` rule variable. That commit moved the flags to `CMAKE_CXX_FLAGS`, which also broke initialization of `CMAKE_CXX_FLAGS` from `CMAKE_CXX_FLAGS_INIT`. Restore the original approach. Fixes: #24111
* Merge topic 'flang-implicit-link-info' into release-3.25Brad King2022-10-121-0/+2
|\ | | | | | | | | | | | | | | 0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7781
| * LLVMFlang: Add support for mixed-language linking with FortranBrad King2022-10-111-0/+2
| | | | | | | | | | | | | | | | | | Parse implicit link information for this compiler to support mixed-language linking. This was missed by commit 85749766df (LLVMFlang: Add support for LLVM Flang, 2021-07-07, v3.24.0-rc1~86^2). Also activate mixed-language test cases that would have caught this. Issue: #22387
* | Merge topic 'Intel-Fortran-warn-errors'Brad King2022-10-104-8/+22
|\ \ | |/ | | | | | | | | | | | | | | 13f3382b1c Intel/IntelLLVM: Fortran has distinct "-Werror"-like flag ab8a0a106e COMPILE_WARNING_AS_ERROR: Fix internal formatting of options table Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7758
| * Intel/IntelLLVM: Fortran has distinct "-Werror"-like flagMichael Hirsch2022-10-072-6/+20
| | | | | | | | | | | | | | Update the compiler options table added by commit 76a08cd253 (COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors, 2022-04-21, v3.24.0-rc1~173^2) to use the Intel Fortran compilers' dedicated `-warn*` flags.
| * COMPILE_WARNING_AS_ERROR: Fix internal formatting of options tableBrad King2022-10-072-2/+2
| | | | | | | | | | | | | | | | In commit 76a08cd253 (COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors, 2022-04-21, v3.24.0-rc1~173^2) we formatted the options table entries as command-line string fragments. Since they are part of the `CMAKE_${lang}_COMPILE_OPTIONS_*` tables, they should be formatted as `;`-separated lists of compiler options.
| * Merge topic 'warning-as-error-ti-compiler' into release-3.24Brad King2022-08-151-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | 1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Josef Angstenberger <code@jtxa.de> Merge-request: !7560
* | | Tasking: Simplify processor list matching regexHutchings Samuel (ETAS/ERS-PRM)2022-10-071-2/+2
| | |
* | | Android/Clang: Tolerate undefined CMAKE_ANDROID_NDK_VERSIONBoris Egorov2022-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix for #21772, commit 005e2cdfb0 (Android: Do not use gold for ndk >= r22, 2021-02-26, v3.20.0-rc3~1^2), doesn't work with typical android toolchain file, like this one: https://android.googlesource.com/platform/ndk/+/master/build/cmake/android-legacy.toolchain.cmake The condition fails to work when CMAKE_ANDROID_NDK_VERSION is undefined: second part evaluates to true, although ndk version is not known. I've encountered following environment where CMAKE_ANDROID_NDK_VERSION is used without definition: * Build uses android toolchain file, which sets CMAKE_SYSTEM_VERSION=1 and doesn't set CMAKE_ANDROID_NDK_VERSION. * Code in Platform/Android-Determine.cmake exits early when it detects toolchain usage (via value CMAKE_SYSTEM_VERSION=1). This file is the only place in cmake modules where variable CMAKE_ANDROID_NDK_VERSION is set, and by early return we skip this definition.
* | | Tasking: Add support for several compiler toolsetsChristoph Seitz2022-09-146-0/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Tasking compiler toolset: * TriCore Compiler Toolset 6.3 (with TriCore, ARM, MCS, 8051 and PCP architecture compilers) * SmartCode Compiler Toolset 10.1 (with TriCore, ARC, MCS, 8051 architecture compilers) * ARM Compiler 6.0 * MCS Complier 3.3 * 8051 Compiler 7.2 Fixes: #23756
* | | CMake: Support upcoming C++26 language levelRobert Maynard2022-08-312-0/+2
| | |
* | | Merge topic 'warning-as-error-ti-compiler'Brad King2022-08-151-0/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Josef Angstenberger <code@jtxa.de> Merge-request: !7560
| * | TI compiler: Add support for COMPILE_WARNING_AS_ERROR target propertyCraig Scott2022-08-111-0/+1
| | |
* | | Merge topic 'mingw-flto'Brad King2022-08-151-1/+8
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 7b2a87c2eb IPO: Do not use -flto=auto with GCC 10.x on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7559
| * | IPO: Do not use -flto=auto with GCC 10.x on WindowsBrad King2022-08-101-1/+8
| |/ | | | | | | | | | | | | | | | | Revise the change from commit fe57410b33 (IPO: Use -flto=auto if compiler is GCC >= 10.1, 2022-06-22, v3.24.0-rc2~2^2) to require at least GCC 11 on Windows. Fixes: #23836 Issue: #23640
* | Merge topic 'enable-intel-llvm-ipo-3'Brad King2022-08-042-6/+60
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c633bd76d8 Add linker prefix for "-stack" flag on MSVC builds 6823db0c5a Enable IPO for IntelLLVM compilers on Linux and Windows adbffd204d Propagate OpenMP compiler flags to linker for IntelLLVM 3640842df2 Tests: Update ModuleDefinition for IntelLLVM MSVC Frontend Variant 5d5a712303 IntelLLVM: Pass linker flags to the compiler when used as linker Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7533
| * | Enable IPO for IntelLLVM compilers on Linux and WindowsWilliam R. Dieter2022-08-012-6/+60
| | | | | | | | | | | | | | | | | | | | | Replicate and adapt Linux IPO options for Intel for IntelLLVM compilers on Linux and Windows. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | CUDA: Add Device LTO support for nvccRobert Maynard2022-07-222-0/+12
|/ / | | | | | | Fixes #22200
* | Merge topic 'nvhpc-Werror'Brad King2022-07-051-1/+1
|\ \ | |/ | | | | | | | | | | 35ec676ace NVHPC: warnings as error flag is "-Werror" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7415
| * NVHPC: warnings as error flag is "-Werror"Robert Maynard2022-07-011-1/+1
| |
* | Merge topic 'add_nvcc_compile_warning_support'Brad King2022-07-051-0/+5
|\ \ | |/ | | | | | | | | | | | | cd324110d2 CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target property 2e9ac1d272 Tests: Refactor warn on error tests to support multiple languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7417
| * CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target propertyRobert Maynard2022-07-011-0/+5
| |
* | Merge topic 'ipo_append_auto_on_gcc'Brad King2022-06-231-1/+12
|\ \ | |/ | | | | | | | | | | fe57410b33 IPO: Use -flto=auto if compiler is GCC >= 10.1 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7400
| * IPO: Use -flto=auto if compiler is GCC >= 10.1Linus Dierheimer2022-06-221-1/+12
| | | | | | | | | | | | | | Since GCC 12.1, the `-flto` option warns unless given an explicit LTRANS job count. Issue: #23640
* | CUDA: Support response files with nvccRobert Maynard2022-06-131-6/+10
|/
* LLVMFlang: Add support for LLVM FlangTin Huynh2022-05-241-0/+13
| | | | | | | | | LLVM Flang (https://github.com/llvm/llvm-project/tree/main/flang) is an LLVM Fortran compiler that shares the same name as Flang (also known as Classic Flang). Classic Flang is in active development and is already identified by CMake as Flang. As such, LLVM Flang will be identified as `LLVMFlang`. Fixes: #22387
* COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errorsMartin Duffy2022-05-0616-27/+53
| | | | | | | | | | | | Add `COMPILE_WARNING_AS_ERROR` target property and supporting `CMAKE_COMPILE_WARNING_AS_ERROR` variable. `COMPILE_WARNING_AS_ERROR` is initialized by `CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is true, it expands to a different flag depending on the compiler such that any warnings at compile will be treated as errors. Supports compiler ids that I could find a relevant flag for.
* ADSP: Add dedicated platform moduleChris Wright2022-04-041-1/+1
|
* ADSP: Configure compiler in compiler moduleChris Wright2022-04-043-0/+53
|
* ADSP: Support both VDSP++ and CCES for ADSP compilersChris Wright2022-04-041-6/+7
|
* Merge topic 'AppleClang-cxx20-cxx23-flags'Brad King2022-03-151-1/+9
|\ | | | | | | | | | | | | 683e4e9cab AppleClang: Add C++20 and C++23 flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7063
| * AppleClang: Add C++20 and C++23 flagsKen Matsui2022-03-111-1/+9
| | | | | | | | | | Follow up commit 886e27062b (Clang/MSVC: C++20 final flag, C++23 support, 2021-05-29, v3.20.4~7^2) with support for AppleClang.
| * Merge branch 'msvc-c++23' into release-3.21Brad King2021-10-121-0/+1
| |\ | | | | | | | | | Merge-request: !6614
* | \ Merge topic 'color-diagnostics'Brad King2022-03-092-0/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6ab9fbd43b color: Add tests for CMAKE_COLOR_DIAGNOSTICS 78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable 884d9de8b7 color: Introduce CMAKE_COLOR_DIAGNOSTICS variable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Frank Dana <ferdnyc@gmail.com> Merge-request: !6990
| * | | color: Introduce CMAKE_COLOR_DIAGNOSTICS variableSemyon Kolton2022-03-082-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a variable to control both makefile color messages and compiler color diagnostics. Fixes: #15502
* | | | Merge topic 'iar-cmp0057'Brad King2022-03-091-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bd3e23a605 IAR: Fix detection of modern C++ version Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7053
| * | | | IAR: Fix detection of modern C++ versionKenneth Soerensen2022-03-081-1/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | The change in commit cc4da8d13a (IAR/CXX: Fix compatibility with CMP0057 OLD, 2022-01-29, v3.23.0-rc1~46^2) broke the detection of C++ version because the `IN_LIST` operator cannot work directly on a list but requires a variable.
* | | | Genx-LINK_LIBRARY: simplify framework features definitionsMarc Chevrier2022-03-041-15/+0
| | | |
* | | | SunPro C: ensure LINKER: prefix is usable for all versionsMarc Chevrier2022-02-271-2/+7
| | | |
* | | | genex-LINK_LIBRARY: rename configuration variablesMarc Chevrier2022-02-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | To be more consistent between genex and variables as well as the forecomming LINK_GROUP genex, rename variable *_LINK_USING_<FEATURE>* in *_LINK_LIBRARY_USING_<FEATURE>*
* | | | GenEx/LINK_LIBRARY: Add features for framework support on AppleMarc Chevrier2022-02-151-0/+15
|/ / /
* | | Merge topic 'iar_cmp0057'Brad King2022-01-311-3/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | cc4da8d13a IAR/CXX: Fix compatibility with CMP0057 OLD Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6921
| * | | IAR/CXX: Fix compatibility with CMP0057 OLDRaul Tambre2022-01-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a9073db7 (IAR: update language specification detection, 2021-09-23) added usage of the if() IN_LIST operation and forgot to account for it not being available in CMP0057 OLD mode. Push and temporarily enable the policy. Also avoid the unnecessary temporary variable for the list. Fixes #23147.
* | | | IBMClang: Add support for IBM Open XL C/C++Aaron Liu2022-01-276-0/+169
| | | | | | | | | | | | | | | | Fixes: #22929