summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* Features: Add special case to disable relaxed constexpr for Intel 18Brad King2018-06-041-1/+1
| | | | | | | | | | Intel compilers define `__cpp_constexpr` to `200704` even in C++14 mode. This indicates that the `cxx_relaxed_constexpr` feature is not available. However, Intel 17 and above document support for it. In commit v3.8.0~9^2 (Features: Update features for Intel C++ 17.0.2 on UNIX, 2017-03-31) we added a special check for this case. Intel 17 and 19 work. However, Intel 18 does not seem to work and fails our test case. Add a special case to disable the feature for Intel 18.
* Merge topic 'fix-ti-c-standard'Brad King2018-06-041-0/+6
|\ | | | | | | | | | | | | 9e27881bb1 TI: Add support for C language standards Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2131
| * TI: Add support for C language standardsArnaud Gelas2018-06-041-0/+6
| | | | | | | | | | | | Set C90 and C99 compile options for TI compiler. Fixes: #18061
* | Move GNU COMPILER_PREDEFINES_COMMAND from Platform to CompilerSebastian Holtermann2018-06-011-0/+2
|/ | | | | | | | Moves `CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND` from linux specific [Modules/Platform/Linux-GNU.cmake](Modules/Platform/Linux-GNU.cmake) to [Modules/Compiler/GNU.cmake](Modules/Compiler/GNU.cmake). This enables compiler predefines generation (in AUTOMOC) on all platforms that run gcc (and clang).
* CUDA: Add compiler detection for CUDA < 7.5Henry Schreiner2018-04-231-3/+5
| | | | | | | If the CUDA version macros are not defined, run `nvcc --version` and extract the version from its output. Fixes: #17920
* SunPro,XL: Add depfile flags to support Ninja generatorEphi Sinowitz2018-04-173-0/+6
| | | | | Add CMAKE_DEPFILE_FLAGS_${lang} to SunPro and XL. These flags are used by the Ninja generator.
* Merge topic 'clang-cl-std'Brad King2018-04-131-5/+42
|\ | | | | | | | | | | | | | | | | 3f82c5904d Clang: Add standard flags support when simulating MSVC 8381bc12ad Clang: Avoid extra C++ feature detection when simulating MSVC 6cddf7ba32 Clang: Refactor standard flags logic when simulating MSVC Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1906
| * Clang: Add standard flags support when simulating MSVCRuben Van Boxem2018-04-111-0/+21
| | | | | | | | | | | | | | When Clang 3.9 simulates MSVC 19.0 or higher it knows the `-std:` flags that such versions of MSVC defines. Fixes: #17866
| * Clang: Avoid extra C++ feature detection when simulating MSVCBrad King2018-04-111-0/+15
| | | | | | | | | | | | | | | | Apply the optimization from commit v3.10.0-rc1~131^2 (MSVC: Avoid unnecessary C++ feature detection steps, 2017-09-11) to the case of Clang simulating a version of MSVC that does not define standards. Issue: #17274
| * Clang: Refactor standard flags logic when simulating MSVCBrad King2018-04-111-5/+6
| | | | | | | | | | Consolidate the compile options and standard defaults branches. Add comments.
* | Merge topic 'features-msvc-2017'Brad King2018-04-121-21/+15
|\ \ | |/ |/| | | | | | | | | 5f4272cc06 Features: Record for VS 2017 through 15.6 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1903
| * Features: Record for VS 2017 through 15.6Daniel Filipe2018-04-111-21/+15
| | | | | | | | | | | | | | VS 15.3 has more features than we recorded in commit v3.7.0-rc1~156^2~2 (Features: Record features for VS 15 Preview 4, 2016-09-05). While at it, update comments and simplify some cases.
* | Android: Do not pass non-existent Clang -std flagsBrad King2018-04-021-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android NDK r16b comes with Android clang version 5.0.300080 (based on LLVM 5.0.300080) Although it claims version 5, it does not support the `-std=c++17` or `-std=c++2a` flags that upstream Clang does. Android NDK r17-beta1 comes with Android (4639204 based on r316199) clang version 6.0.1 that does have the flags.
* | Merge topic 'features-c++20'Brad King2018-04-024-2/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8570dc7f64 Help: Update compiler versions in cmake-compile-features.7.rst 874d3d2948 Help: Add release note for C++ 20 support 7f295b1bd3 Features: Activate C++ 20 support for Clang 5.0+ 71cb8ce3a1 Features: Activate C++ 20 support for GNU 8.0+ 8f146c4508 Features: Activate C++ 20 support for MSVC 19.12.25835+ 7fe580a362 Features: Add infrastructure for C++ 20 language standard 1b328e09a3 Features: Use -std=c++17 for C++ 17 on Clang 5.0+ 0bc3e5788a Features: Use -std=c++17 for C++ 17 on GNU 8.0+ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1892
| * | Features: Activate C++ 20 support for Clang 5.0+Brad King2018-03-271-0/+5
| | |
| * | Features: Activate C++ 20 support for GNU 8.0+Brad King2018-03-271-0/+5
| | |
| * | Features: Activate C++ 20 support for MSVC 19.12.25835+Brad King2018-03-271-0/+4
| | |
| * | Features: Add infrastructure for C++ 20 language standardBrad King2018-03-273-0/+14
| | | | | | | | | | | | Issue: #17849
| * | Features: Use -std=c++17 for C++ 17 on Clang 5.0+Brad King2018-03-261-1/+4
| | | | | | | | | | | | Clang 5.0 added support for the `-std=c++17` flag.
| * | Features: Use -std=c++17 for C++ 17 on GNU 8.0+Brad King2018-03-261-1/+4
| |/ | | | | | | GNU 8 now documents official support for the `-std=c++17` flag.
* | Features: Record C features for MSVCBrad King2018-03-292-0/+33
|/ | | | | | | | | The MSVC C compiler has no notion of C language standards or flags. Tell CMake to assume that all language standards are available. Record available C language features depending on the version of the compiler. Fixes: #17858
* Features: Record for SunPro 5.15Brad King2018-03-201-1/+5
| | | | Oracle Developer Studio 12.6 adds support for more C++ 11 features.
* Features: Record initializer list support for Intel 14 and aboveBrad King2018-03-161-5/+1
| | | | | | | | | | | | | | | Features recorded by commit v3.6.0-rc1~120^2~5 (Features: Record standards and features for Intel C++ on UNIX, 2016-04-28) for the Intel compiler left out initializer list support because our test case in `Tests/CompileFeatures/cxx_generalized_initializers.cpp` caused an internal compiler error. It turns out this is because the Intel compiler asserts the `initializer_list` constructor signatures to verify that they match its own `<initializer_list>` header. It was our dummy implementation used to test the language feature without any headers that caused the ICE. Revise it to use a constructor signature accepted by the Intel compiler. Fixes: #17829
* Merge branch 'cuda-no-device-link-rsp' into release-3.11Brad King2018-03-071-0/+6
|\ | | | | | | Merge-request: !1831
| * CUDA: Do not pass unsupported @rspfile arguments to NVCCBrad King2018-03-071-0/+6
| | | | | | | | | | | | | | The nvcc compiler does not support `@<rspfile>` arguments. It does offer a `--options-file` argument that can be investigated later. Fixes: #17797
* | XL: Recognize compilers identified by __ibmxl__Brad King2018-03-064-10/+26
|/ | | | | | | | | IBM XL C/C++ for Linux versions 13.1.6 and above no longer define `__IBMC__` or `__IBMCPP__` by default (see `-qxlcompatmacros`). Instead `__ibmxl__` now identifies the compiler along with some related new version macros. Fixes: #17784
* Compiler/TI: Fix depfile generation for C++Grzegorz Dobinski2018-02-201-1/+1
| | | | | | | | In commit v3.11.0-rc1~466^2 (Compiler/TI: Add support for depfile generation for Ninja, 2017-10-16) the flag for C++ was added in a variable with a typo in its name. Fix the spelling. Issue: #17360
* Merge topic 'intel-cxx17-flags'Brad King2018-01-292-1/+13
|\ | | | | | | | | | | | | | | c3d576f5 Intel: Add C++17 compiler options 4a5727d3 Intel: Correct the C11 ext flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1711
| * Intel: Add C++17 compiler optionsChristian Pfeiffer2018-01-271-0/+11
| | | | | | | | | | | | | | Since Intel C++ 18.0, some C++17 features are supported if the flags -std=c++17, respectively /Qstd=c++17 are given. Fixes: #17687
| * Intel: Correct the C11 ext flagChristian Pfeiffer2018-01-271-1/+2
| | | | | | | | Intel does not support a 'gnu11' standard flag, only 'c11'.
* | Merge topic 'xl-qoptfile'Brad King2018-01-251-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | c4dc6485 XL: Enable use of response files for includes and objects e342e410 Makefile,Ninja: Use tool-specific response file flag for include dirs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1691
| * | XL: Enable use of response files for includes and objectsBrad King2018-01-241-0/+2
| |/ | | | | | | | | The IBM XL compiler supports response files via `-qoptfile=<file>` instead of `@<file>`.
* | Merge topic 'fix-cray-pic'Brad King2018-01-255-6/+15
|\ \ | |/ |/| | | | | | | | | b886b46c Cray: Add common PIC flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1692
| * Cray: Add common PIC flagsChuck Atkins2018-01-245-7/+16
| | | | | | | | Fixes #17208
* | MSVC: Avoid warning when enabling ASM language with C compilerBrad King2018-01-101-0/+1
| | | | | | | | | | | | | | | | The `CMakeASMInformation` module warns when no compiler-specific module is found for the `ASM` language. Add a minimal `Compiler/MSVC-ASM` module to avoid the warning for MSVC. Fixes: #17532
* | Various typo fixesLuz Paz2018-01-031-1/+1
| | | | | | | | Some are user-facing. Others are source comments.
* | Merge topic 'fix-iar-binutils-for-cxx'Brad King2017-12-121-2/+2
|\ \ | |/ | | | | | | | | | | e4707048 IAR: FindBinUtils should work for CXX as well as C Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1572
| * IAR: FindBinUtils should work for CXX as well as CIslam Amer2017-12-121-2/+2
| | | | | | | | | | | | The IAR compiler test works when a project specifies LANGUAGES C CXX but fails if CXX comes before C. This change makes it work regardless of the order.
| * Merge branch 'mingw-clang-c-compile-features' into release-3.10Brad King2017-11-011-1/+1
| |\ | | | | | | | | | Merge-request: !1435
| * \ Merge branch 'flang-remove-boundscheck' into release-3.10Brad King2017-10-191-2/+0
| |\ \ | | | | | | | | | | | | Merge-request: !1393
* | \ \ Merge topic 'flang-windows'Brad King2017-11-081-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3c368228 Flang: Add support for compiling sources on Windows 72d27964 Flang: Identify as simulating MSVC on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1430
| * | | | Flang: Identify as simulating MSVC on WindowsIsuru Fernando2017-10-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In `CMakeFortranCompilerId.F.in`, take the `_MSC_VER` out of the Intel-specific block so it will trigger for other compilers like Flang. In `Compiler/Clang.cmake`, switch off Fortran too.
* | | | | Fix trivial typos in textluzpaz2017-11-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* | | | | Merge topic 'mingw-clang-c-compile-features'Brad King2017-11-011-1/+1
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | | | | | | | | | f86879a0 Record C compile features flags for MinGW Clang on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1435
| * | | Record C compile features flags for MinGW Clang on WindowsBrad King2017-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done for C++ by commit v3.5.0-rc1~69^2 (Record compile features for MinGW Clang on Windows, 2016-01-11). Make the same change for C. The `UNIX` condition on Clang C compiler features was already dropped by refactoring in commit v3.9.0-rc1~17^2~4 (Compilers: Port to use default cmake_record_lang_compile_features macros, 2017-05-10). Our documentation already claims support for this combination. This was simply an oversight when support was added for MinGW Clang C++. Issue: #15897 Issue: #15943
* | | | Merge topic 'flang-remove-boundscheck'Brad King2017-10-231-2/+0
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | 3aeff21d Flang: Remove unsupported fbounds-check flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1393
| * | | Flang: Remove unsupported fbounds-check flagChristian Pfeiffer2017-10-191-2/+0
| |/ / | | | | | | | | | | | | The Flang compiler neither supports nor documents -fbounds-check leading to -Wunused-command-line-argument warnings with the default Debug flags.
* | | Compiler/TI: Add support for depfile generation for NinjaNico Müller2017-10-182-0/+4
| |/ |/| | | | | | | | | | | TI C/C++ compiler are now able to generate dependency files during compilation. Fixes: #17360
* | IPO: Fix support for spaces in path to archive toolsThomas Stenersen2017-10-062-6/+6
|/ | | | | | | | In the normal archiving rules the ``<CMAKE_AR>`` placeholder is replaced by the generators with a properly-quoted path to the tool. In the IPO rules we specify the tools directly, so we need to quote them. Fixes: #17326
* IAR: Detect compiler platform versionStefan Andersson2017-10-031-2/+5
| | | | | | | | `__IAR_SYSTEMS_ICC__` provides additional version information that we need to determine correct usage of the compiler. Extract and store it as `CMAKE_<LANG>_COMPILER_VERSION_INTERNAL`. Issue: #17264