summaryrefslogtreecommitdiff
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * TI compiler: Add support for COMPILE_WARNING_AS_ERROR target propertyCraig Scott2022-08-121-0/+1
| |
* | 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
* NVHPC: warnings as error flag is "-Werror"Robert Maynard2022-07-011-1/+1
|
* CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target propertyRobert Maynard2022-07-011-0/+5
|
* 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
* 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
* | | | Merge topic 'msvc-isystem'Brad King2022-01-122-2/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | 3a8b6653dc MSVC: Use -external:I flag without space to support Clang tools Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6855
| * | | MSVC: Use -external:I flag without space to support Clang toolsBrad King2022-01-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit f29e1874ad (Compiler/MSVC: use the `-external:I` flag for system includes, 2020-05-19, v3.22.0-rc1~593^2) we use the new flag followed by the include directory as a separate argument. Some versions of `clang-cl` and `clang-tidy` do not support the flag unless the include directory is attached to it, so use that form instead. Fixes: #22979
| * | | Merge topic 'nvhpc-isystem' into release-3.22Brad King2021-11-031-0/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92624714c4 NVHPC: Support SYSTEM include directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6691
* | | | | CUDA: Support CMP0105 on ClangRaul Tambre2021-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add link flags during the "device compile" step. Enabled the relevant tests. The disable reasons regarding separable compilation were outdated and the actual failure case was device link flags support.
* | | | | Merge topic 'nvhpc-isystem'Brad King2021-11-031-0/+1
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | 92624714c4 NVHPC: Support SYSTEM include directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6691
| * | | | NVHPC: Support SYSTEM include directoriesRobert Maynard2021-11-021-0/+1
| | | | | | | | | | | | | | | | | | | | Fixed #22834
* | | | | Merge topic 'msvc-c17'Brad King2021-10-291-29/+39
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c5cc4ddac4 MSVC: Add support for C17 6561b032bc MSVC: Tolerate c_std_17 and c_std_23 features on older compiler versions 22f804e0ec MSVC: Refactor C compile features table for C90, C99, and C11 Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !6677
| * | | | MSVC: Add support for C17Brad King2021-10-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C17 support has been available in MSVC since VS 16.8. Fixes: #22816
| * | | | MSVC: Tolerate c_std_17 and c_std_23 features on older compiler versionsBrad King2021-10-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSVC `cl` versions prior to 19.27 had no `-std:c*` flags for C standards. List the `c_std_{17,23}` features anyway. This allows projects to at least attempt compilation with these compilers since they do not have any modes.
| * | | | MSVC: Refactor C compile features table for C90, C99, and C11Brad King2021-10-281-29/+35
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom "no modes" `cmake_record_c_compile_features` implementation should only be used in `cl` versions prior to 19.27 because they had no `-std:c*` flags for C standards. For 19.27 we need a different custom implementation to account for partial C11 support. For 19.28 and above we can use the default implementation through the `*__HAS_FULL_SUPPORT` settings. We already use this pattern in the MSVC C++ compile feature table.
| * | | Merge topic 'msvc-c++23' into release-3.22Brad King2021-10-121-0/+1
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | ef47e18ad0 MSVC: Tolerate cxx_std_23 feature on older compiler versions Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !6614
* | | | Merge topic 'lcc-policy'Brad King2021-10-222-0/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6643
| * | | | LCC: Add policy CMP0129 regarding interpreting LCC as GNUmakise-homura2021-10-212-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to MCST LCC compiler identification is now changed to LCC, there should be a way for old projects to still identify it as GNU, as it was before. This commits adds the policy: CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU. This policy controls such a behavior. OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
* | | | | CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATIONRobert Maynard2021-10-202-2/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | The target properties `CUDA_SEPARABLE_COMPILATION` and `CUDA_PTX_COMPILATION` now aren't mutually exclusive and can now be used together on the same target.
* | | | Merge topic 'lcc-compiler'Brad King2021-10-199-0/+366
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 02b2607a5c Help: Add release note for MCST LCC compiler support e5d9fce03f LCC: Add dedicated support for MCST LCC compiler 2b9ef77944 CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecture 0995c75301 Tests/RPM: skip tests tat rely on debugedit if it's not found ea55ac9a51 Tests/RunCMake/CommandLine: Deal with locales that are different from English Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6608
| * | | | LCC: Add dedicated support for MCST LCC compilermakise-homura2021-10-159-0/+366
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Divert LCC compiler as a new one, instead of treating it as GNU. Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been passing checks for GNU compilers, so it has been identified as GNU. Now, with intent of seriously upstreaming its support, it has been added as a separate LCC compiler, and its version displays not a supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead of GNU 7.3.0). This commit adds its support for detection, and also converts basically every check like 'is this compiler GNU?' to 'is this compiler GNU or LCC?'. The only places where this check is untouched, is where it regards other platforms where LCC is unavailable (primarily non-Linux), and where it REALLY differs from GNU compiler. Note: this transition may break software that are already ported to Elbrus, but hardly relies that LCC will be detected as GNU; still such software is not known.
* | | | Merge topic 'msvc-c++23'Brad King2021-10-121-0/+1
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | | | | ef47e18ad0 MSVC: Tolerate cxx_std_23 feature on older compiler versions Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !6614
| * | MSVC: Tolerate cxx_std_23 feature on older compiler versionsBrad King2021-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 3aaf1d91bf (MSVC: C++20 final flag, C++23 support, 2021-05-29, v3.20.4~7^2~1) we forgot to add `cxx_std_23` to the fallback table for MSVC versions from VS 2010 through VS 2015. This allows project to at least attempt compilation with these compilers since they do not have any modes. Issue: #22729
| * | IntelLLVM: Fix C/C++ standard level flags on WindowsBrad King2021-07-072-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'corret_nvhpc_fortran_compile_deps'Brad King2021-10-073-12/+21
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 1a828043b7 NVHPC: only use '-MD' for the C and CXX languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6602
| * | NVHPC: only use '-MD' for the C and CXX languagesRobert Maynard2021-10-063-12/+21
| | | | | | | | | | | | | | | | | | CMake shouldn't use '-MD' for nvfortran to generate dependency information. Fixes #22723
* | | Merge topic 'iar-assembly-S-extension'Brad King2021-10-051-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 589c6c8e3f IAR: added .S extension for IAR-ASM.cmake Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6585
| * | | IAR: added .S extension for IAR-ASM.cmakeFelipe Torrezan2021-10-021-1/+1
| | | |
* | | | cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logicRaul Tambre2021-09-292-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes are part of CMP0128. When the standard level is unset: * Flags are added if extension mode doesn't match the compiler's default. Previously logic only worked if LANG_EXTENSIONS was ON. Fixes #22224. * The full flag is used. Previously CMAKE_LANG_EXTENSION_COMPILE_OPTION was used. This was only supported for IAR. Otherwise: * Avoid adding flags if not necessary per the detected compiler defaults. * Fixed check for when the requested standard is older. It now matches the nearby comments. I reworded the fallback comment as its logic was a bit difficult to wrap my head around.