Commit Graph

379 Commits

Author SHA1 Message Date
Brad King
7f8999dfc6 Merge topic 'pgi-fortran-flag-fix'
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
2017-09-20 13:21:21 -04:00
Tin Huynh
485a6f0ef2 PGI-Fortran: Add -Mipa=fast,inline as IPO option.
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.
2017-09-15 15:27:21 -07:00
Brad King
39be8a9d19 MSVC: Avoid unnecessary C++ feature detection steps
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
2017-09-12 09:13:44 -04:00
Tin Huynh
97f0b177df PGI-Fortran: Remove -Kieee and -Mpreprocess
Fixes #17209
2017-09-05 17:35:07 -07:00
Nils Gladitz
227e353595 MSVC: Extend C++ language standard support to Visual Studio 2015 Update 3 2017-09-01 23:33:12 +02:00
Tin Huynh
2f3a07a981 Flang: Add support for flang Fortran compiler
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
2017-08-31 15:24:59 -04:00
Raul Laasner
90a34ff791 Ninja: Fix references to source files in gfortran diagnostics
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
2017-08-23 15:32:44 -04:00
Brad King
867b061153 Merge topic 'debian_clang_binutils'
630235bd Clang: Find version-suffixed LLVM/Clang binutils

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1127
2017-08-16 10:47:10 -04:00
Sylvain Joubert
630235bd9e Clang: Find version-suffixed LLVM/Clang binutils
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.
2017-08-15 14:51:44 -04:00
Norbert Lange
168b42d247 IAR: Enable extensions by default
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).
2017-08-03 09:56:36 -04:00
Brad King
131c721f54 MSVC: Add flags for C++ language standards
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
2017-07-17 10:48:43 -04:00
Brad King
1ff7cd1fe7 Merge topic 'iar_improved'
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
2017-07-07 08:42:22 -04:00
Norbert Lange
d8e6cd9ed8 IAR: Improve support for IAR ARM Compiler
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
2017-06-29 13:25:58 -04:00
Brad King
e40e8f5c42 Merge topic 'clang-cl-no-std'
c67bb5ba Clang: Do not add '-std=' options when simulating MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !982
2017-06-28 08:55:12 -04:00
Ruben Van Boxem
c67bb5bae3 Clang: Do not add '-std=' options when simulating MSVC
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
2017-06-27 13:04:41 -04:00
Brad King
04b2fc08b4 GCC,Clang: Mark CMAKE_<LANG>_COMPILER_{AR,RANLIB} as advanced 2017-06-22 11:33:54 -04:00
Brad King
ba247ccaba IPO: Consider support for each language separately
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
2017-06-14 10:36:57 -04:00
Chuck Atkins
3c1ecb5214 Intel: Fix missing C std default for 12.0 <= ver < 12.1 2017-05-31 13:09:49 -04:00
Chuck Atkins
f70b0bb365 SunPro: Make sure all known versions get CXX98 defaults 2017-05-31 13:09:42 -04:00
Chuck Atkins
220ede74ff GNU: Fix language defaults for 3.4 2017-05-30 09:35:06 -04:00
Chuck Atkins
a40e6ba88d Clang: Fix language defaults for 2.1 2017-05-30 09:35:06 -04:00
Chuck Atkins
9b112a848a Compilers: Port to use default cmake_record_lang_compile_features macros 2017-05-30 09:34:36 -04:00
Chuck Atkins
37221529c7 MSVC: Add empty definitions for std compile options
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.
2017-05-29 13:51:54 -04:00
Chuck Atkins
5bb7429166 Compilers: Add default cmake_record_{c,cxx}_compile_features macros
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.
2017-05-29 12:33:42 -04:00
Brad King
d375618921 Merge topic 'sunpro-std-flags'
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
2017-05-28 09:22:33 -04:00
Daniel Pfeifer
f1f21e3077 SunPro: set -library=stlport as standard compile option for C++98 2017-05-26 13:26:39 -04:00
Daniel Pfeifer
9316120c80 SunPro: add standard compile option for C++03 2017-05-26 13:26:39 -04:00
Daniel Pfeifer
fc51b92c80 Intel: avoid variables in language standard flags
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.
2017-05-26 08:21:50 +02:00
Andreas Weis
68ea936ff5 Added space after IAR response file flag
Without the space between the flag and the filename, IAR will fail to
parse the arguments correctly.
2017-05-23 07:25:27 +02:00
Brad King
c9d9a3fb39 Merge topic 'pgi-fix-windows'
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
2017-05-22 10:37:57 -04:00
Christian Pfeiffer
a94ae96e6e Windows-PGI: Adapt default compiler flags
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++.
2017-05-20 20:02:51 +02:00
Ruslan Baratov
75accaae8b GCC: more patterns for ar/ranlib 2017-05-14 12:31:26 +03:00
Brad King
592206a157 Merge topic 'add_cuda_cxx14_flag'
036ffe81 CUDA: Add support for the C++14 standard flag.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !830
2017-05-12 09:13:19 -04:00
Brad King
5d13fe2822 Features: Record features for SunPro C 5.13 and 5.14 2017-05-11 15:59:48 -04:00
Robert Maynard
036ffe815a CUDA: Add support for the C++14 standard flag.
CUDA 9 toolkit has announced support for C++14 flag, so lets allow users
to use it.
2017-05-11 13:42:42 -04:00
Brad King
20c838da6b Merge topic 'sunpro-fpp-fix'
1cd40bd2 SunPro: Use -fpp to process all files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !826
2017-05-11 09:59:47 -04:00
Christian Pfeiffer
1cd40bd226 SunPro: Use -fpp to process all files
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.
2017-05-10 19:33:48 +02:00
Chuck Atkins
67c9f47901 PGI: Fix typo in compiler version test for language standards 2017-05-10 12:25:44 -05:00
Chuck Atkins
1a09a7d992 SunPro: Add more flags for C language standards 2017-05-04 14:10:07 -04:00
Brad King
f15f905bab Features: Record standards and features for SunPro 5.14
Oracle Studio 12.5 adds support for C 11 and associated standard flags.
It also adds a few more C++ 11 features.
2017-05-03 13:13:43 -04:00
Brad King
bf3c08d648 Merge topic 'port-language-default-to-common-macro'
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
2017-05-03 11:01:12 -04:00
Chuck Atkins
0225417f60 PGI: Fix typo in logic for C standard flags 2017-05-02 10:08:56 -04:00
Chuck Atkins
d908987634 AppleClang: Use common compiler macros for language standard default 2017-05-02 09:49:23 -04:00
Chuck Atkins
174c02e149 SunPro: Use common compiler macros for language standard default 2017-05-02 09:49:23 -04:00
Chuck Atkins
08fa2ba8d0 Clang: Use common compiler macros for language standard default 2017-05-02 09:49:23 -04:00
Chuck Atkins
0198502ff4 Intel: Use common compiler macros for language standard default 2017-05-02 09:49:23 -04:00
Chuck Atkins
d1aa2b3f60 GNU: Use common compiler macros for language standard default 2017-05-02 09:49:23 -04:00
Chuck Atkins
87b9d6d93f XL: Use common compiler macros for language standard default 2017-05-02 09:49:23 -04:00
Brad King
a9e48968bb Merge topic 'add-language-standards-to-more-compilers'
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
2017-05-02 08:24:06 -04:00
Chuck Atkins
9b97cb5562 PGI: Add language standards for PGI 2017-05-01 15:15:30 -04:00