summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Clang: Fix language defaults for 2.1Chuck Atkins2017-05-301-1/+1
|
* Compilers: Port to use default cmake_record_lang_compile_features macrosChuck Atkins2017-05-3011-171/+2
|
* MSVC: Add empty definitions for std compile optionsChuck Atkins2017-05-291-2/+16
| | | | | | There are no specific options for MSVC to set language standards, but set them as empty strings anyways so the feature test infrastructure can at least check to see if they are defined.
* Compilers: Add default cmake_record_{c,cxx}_compile_features macrosChuck Atkins2017-05-291-0/+31
| | | | | | Add default implementations for the cmake_record_lang_compile_features macros. All implementations of this are the same so it can be safely factored out to a common implementation.
* Merge topic 'sunpro-std-flags'Brad King2017-05-281-2/+6
|\ | | | | | | | | | | | | | | | | | | 370d0d25 SunPro: update flags used for CMake itself f1f21e30 SunPro: set -library=stlport as standard compile option for C++98 9316120c SunPro: add standard compile option for C++03 783fbb77 Tests: Compile entire Plugin test with the same language standard Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !879
| * SunPro: set -library=stlport as standard compile option for C++98Daniel Pfeifer2017-05-261-0/+4
| |
| * SunPro: add standard compile option for C++03Daniel Pfeifer2017-05-261-2/+2
| |
* | Intel: avoid variables in language standard flagsDaniel Pfeifer2017-05-262-36/+44
| | | | | | | | | | | | In the bootstrap script, we want to be able to extract language standard flags using sed. Make sure the content of the flag varianbles can be passed unmodified to the compiler.
* | Added space after IAR response file flagAndreas Weis2017-05-232-2/+2
|/ | | | | Without the space between the flag and the filename, IAR will fail to parse the arguments correctly.
* Merge topic 'pgi-fix-windows'Brad King2017-05-221-1/+9
|\ | | | | | | | | | | | | | | | | 4eb15824 Windows-PGI: Add platform definitions a94ae96e Windows-PGI: Adapt default compiler flags c2c2d366 ImplicitLinkInfo: Add support for PGI on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !794
| * Windows-PGI: Adapt default compiler flagsChristian Pfeiffer2017-05-201-1/+9
| | | | | | | | | | | | PGI demands -Bdynamic (/MD equivalent) for linking together dynamic libraries, so we should make it our default mirroring the settings of e.g. Visual C++ and Intel C++.
* | GCC: more patterns for ar/ranlibRuslan Baratov2017-05-141-2/+10
|/
* Merge topic 'add_cuda_cxx14_flag'Brad King2017-05-121-0/+6
|\ | | | | | | | | | | | | 036ffe81 CUDA: Add support for the C++14 standard flag. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !830
| * CUDA: Add support for the C++14 standard flag.Robert Maynard2017-05-111-0/+6
| | | | | | | | | | CUDA 9 toolkit has announced support for C++14 flag, so lets allow users to use it.
* | Features: Record features for SunPro C 5.13 and 5.14Brad King2017-05-112-0/+29
| |
* | Merge topic 'sunpro-fpp-fix'Brad King2017-05-111-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 1cd40bd2 SunPro: Use -fpp to process all files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !826
| * | SunPro: Use -fpp to process all filesChristian Pfeiffer2017-05-101-2/+2
| |/ | | | | | | | | | | | | By using only -F, SunPro does not process files that don't have a .F or .F90 extension. This means that the preprocess rules don't quite work as expected, for instance breaking the Ninja generator's behavior during cmake_ninja_depends.
* | PGI: Fix typo in compiler version test for language standardsChuck Atkins2017-05-101-1/+1
|/
* SunPro: Add more flags for C language standardsChuck Atkins2017-05-041-4/+11
|
* Features: Record standards and features for SunPro 5.14Brad King2017-05-032-0/+18
| | | | | Oracle Studio 12.5 adds support for C 11 and associated standard flags. It also adds a few more C++ 11 features.
* Merge topic 'port-language-default-to-common-macro'Brad King2017-05-0316-174/+69
|\ | | | | | | | | | | | | | | | | | | | | | | d9089876 AppleClang: Use common compiler macros for language standard default 174c02e1 SunPro: Use common compiler macros for language standard default 08fa2ba8 Clang: Use common compiler macros for language standard default 0198502f Intel: Use common compiler macros for language standard default d1aa2b3f GNU: Use common compiler macros for language standard default 87b9d6d9 XL: Use common compiler macros for language standard default Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !787
| * AppleClang: Use common compiler macros for language standard defaultChuck Atkins2017-05-022-23/+2
| |
| * SunPro: Use common compiler macros for language standard defaultChuck Atkins2017-05-022-11/+16
| |
| * Clang: Use common compiler macros for language standard defaultChuck Atkins2017-05-023-26/+4
| |
| * Intel: Use common compiler macros for language standard defaultChuck Atkins2017-05-023-29/+6
| |
| * GNU: Use common compiler macros for language standard defaultChuck Atkins2017-05-023-26/+4
| |
| * XL: Use common compiler macros for language standard defaultChuck Atkins2017-05-023-59/+37
| |
* | PGI: Fix typo in logic for C standard flagsChuck Atkins2017-05-021-1/+1
|/
* Merge topic 'add-language-standards-to-more-compilers'Brad King2017-05-027-0/+146
|\ | | | | | | | | | | | | | | | | | | 9b97cb55 PGI: Add language standards for PGI daae564d Cray: Add language standards for the Cray compiler 25e83ce5 CompileFeatures: Let STD compile options be a list 1de70845 Compilers: Add common macros to be used by various compilers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !784
| * PGI: Add language standards for PGIChuck Atkins2017-05-013-0/+34
| |
| * Cray: Add language standards for the Cray compilerChuck Atkins2017-05-013-0/+50
| |
| * Compilers: Add common macros to be used by various compilersChuck Atkins2017-05-011-0/+62
| | | | | | | | | | | | | | | | | | | | With numerous compilers now supporting multiple language standards in CMake, some common design patterns have begun to emerge. This is intended to be a collection of macros implementing many of those common design patterns that can be factored out and leveraged by many compilers. Currently this only contains the code to set the default language standard of not preset. More functionality will be added in the future as appropriate.
* | Features: On SunPro link with language standard compiler flagBrad King2017-05-011-0/+1
|/ | | | | | When C++ feature requirements or `CXX_STANDARD` cause us to compile on SunPro with the `-std=c++11` option, link with the option too. This is needed to make the compiler use the matching standard library.
* Merge topic 'ipo-clang'Brad King2017-05-012-6/+73
|\ | | | | | | | | | | | | 7d057b27 Clang IPO (LTO) support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !717