summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* 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
* CUDA: Add support for requesting C++98 under CUDA 9Robert Maynard2017-09-261-0/+2
| | | | | | | | | Starting in CUDA 9 the default compilation mode is C++14, and you need to explicitly enable C++98/03 mode. While at it, document `14` among the values for `CUDA_STANDARD`. This was accidentally left out of commit v3.9.0-rc1~118^2 (CUDA: Add support for the C++14 standard flag, 2017-05-11).
* Merge topic 'pgi-fortran-flag-fix'Brad King2017-09-202-5/+8
|\ | | | | | | | | | | | | | | 485a6f0e PGI-Fortran: Add -Mipa=fast,inline as IPO option. 97f0b177 PGI-Fortran: Remove -Kieee and -Mpreprocess Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1239
| * PGI-Fortran: Add -Mipa=fast,inline as IPO option.Tin Huynh2017-09-151-4/+8
| | | | | | | | | | | | | | Remove -Mipa=fast as a default flag and add it as an option instead. -Mipa=fast is a flag that speeds up runtime but at the cost of significant compile time increase and therefore, shouldn't be a default flag. In addition, -Mipa isn't supported on PGI OpenPOWER or x86/llvm compilers.
| * PGI-Fortran: Remove -Kieee and -MpreprocessTin Huynh2017-09-061-1/+0
| | | | | | | | Fixes #17209
* | MSVC: Avoid unnecessary C++ feature detection stepsBrad King2017-09-121-0/+24
| | | | | | | | | | | | | | | | | | | | | | Since commit v3.9.0-rc1~17^2~4 (Compilers: Port to use default cmake_record_lang_compile_features macros, 2017-05-10) we run full per-language-standard feature detection for MSVC. This is not necessary because the base mode for MSVC has all features we define except for the meta-features for C++14 and above. Override the default C++ feature detection macro for MSVC to run detection only once as before. Fixes: #17274
* | MSVC: Extend C++ language standard support to Visual Studio 2015 Update 3Nils Gladitz2017-09-011-1/+4
| |
* | Flang: Add support for flang Fortran compilerTin Huynh2017-08-312-0/+13
|/ | | | | | | | | | | | | | flang is a Fortran compiler built on top of clang [1]. Because flang shares a lot of commonalities with clang, the flang module piggybacks off the clang module and overrides certain options. Add flang to Fortran compiler auto find list. Update flang preprocessor macros to differentiate from PGI. Add Flang-FindBinUtils. [1] https://github.com/flang-compiler/flang
* Ninja: Fix references to source files in gfortran diagnosticsRaul Laasner2017-08-231-0/+2
| | | | | | | | | The Ninja generator preprocesses and compiles separately for Fortran. When compiling, tell gfortran that the source is already preprocessed so that it will honor the `# <line>` directives when producing diagnostics messages. Fixes: #17160
* Merge topic 'debian_clang_binutils'Brad King2017-08-161-0/+8
|\ | | | | | | | | | | | | 630235bd Clang: Find version-suffixed LLVM/Clang binutils Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1127
| * Clang: Find version-suffixed LLVM/Clang binutilsSylvain Joubert2017-08-151-0/+8
| | | | | | | | | | | | | | | | | | Debian renames all LLVM/Clang binaries with a version suffix to allow multiple versions to be installed at the same time. While there is a version-agnostic package that adds a symlink to provide the standard binary names, if only the versioned packages are installed, binaries must be found as `binary-x.y`. In any case, using the same version of the `binutils` as the compiler seems better.
* | IAR: Enable extensions by defaultNorbert Lange2017-08-032-0/+5
| | | | | | | | | | | | | | Set the variable added by commit a2112257 (Add infrastructure to use language extensions without any standard, 2017-06-29) for IAR. This was accidentally left out of commit d8e6cd9e (IAR: Improve support for IAR ARM Compiler, 2017-06-15).
* | MSVC: Add flags for C++ language standardsBrad King2017-07-171-1/+19
| | | | | | | | | | | | | | | | | | | | | | Visual Studio 2015 Update 3 introduced the notion of language standard levels to MSVC. The language standard level is defined in `_MSVC_LANG` instead of `__cplusplus`. It also added support for the `-std:c++14` and `-std:c++latest` flags, although the compiler defaults to its C++14 mode anyway. Visual Studio 2017 Update 3 will introduce support for the `-std:c++17` flag. Fixes: #16482
* | Merge topic 'iar_improved'Brad King2017-07-076-75/+196
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d8e6cd9e IAR: Improve support for IAR ARM Compiler 0b1a2876 Add a CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID variable fea7d69d Store CMAKE_ASM_COMPILER_VERSION persistently d2a8b5ce CMakeDetermineASMCompiler: Fix small copy-paste mistake a2112257 Add infrastructure to use language extensions without any standard 8cd28bb0 cmLocalGenerator: Switch order of <LANG>_{EXTENSIONS,STANDARD} check 0fc2d78e cmLocalGenerator: Simplify logic for language standard or extension flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !991
| * | IAR: Improve support for IAR ARM CompilerNorbert Lange2017-06-296-75/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the implementation for this compiler more complete. IAR has multiple C++ modes, historically they were reduced c++ versions for embedded that gradually improved to the full standard (which can be reduced again by e.g. disabling rtti and exceptions). The new implementation picks the best available, but the c++ mode can also be overridden by defining `CMAKE_IAR_CXX_FLAG`. Add C/C++ standard flags so that all modes up to and including the last supported standard are defined. Fixes: #16826
* | | Merge topic 'clang-cl-no-std'Brad King2017-06-282-29/+61
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | c67bb5ba Clang: Do not add '-std=' options when simulating MSVC Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !982
| * | Clang: Do not add '-std=' options when simulating MSVCRuben Van Boxem2017-06-272-29/+61
| |/ | | | | | | | | | | | | The `cl.exe` style command line does not accept the `-std=` options. Instead behave like MSVC where we don't define standard levels. Fixes: #16266
* | GCC,Clang: Mark CMAKE_<LANG>_COMPILER_{AR,RANLIB} as advancedBrad King2017-06-222-0/+4
|/
* IPO: Consider support for each language separatelyBrad King2017-06-143-7/+7
| | | | | | | | | We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944
* Intel: Fix missing C std default for 12.0 <= ver < 12.1Chuck Atkins2017-05-311-1/+1
|
* SunPro: Make sure all known versions get CXX98 defaultsChuck Atkins2017-05-311-3/+3
|
* GNU: Fix language defaults for 3.4Chuck Atkins2017-05-301-1/+1
|