Commit Graph

535 Commits

Author SHA1 Message Date
Brad King
5cfc39127e Merge branch 'backport-clang-gnulike-support' into clang-gnulike-support 2019-07-24 08:00:53 -04:00
Brad King
d50b31be35 Clang: For MSVC ABI do not use modes older than C++14
Since commit d44c0db0b2 (clang: setup correct configuration in gnu mode,
2019-02-20, v3.15.0-rc1~41^2~5) we support the GNU-like Clang that
targets the MSVC ABI.  However, Clang cannot compile with the MSVC
standard library unless it runs in a mode aware of C++14 (since MSVC
itself does not even have a lower mode).  When `CMAKE_CXX_STANDARD` is
set to 98 or 11, use C++14 anyway.

Since Clang's default mode is aware of C++14, another option is to not
add any flags for 98 or 11.  However, if a future Clang version ever
defaults to a higher C++ standard, setting the standard to 98 or 11
should at least not use a mode higher than 14.

Also revert test updates from commit 4819ff9647 (Tests: fix failures
with gnu mode clang on windows, 2019-03-21, v3.15.0-rc1~41^2~3) that
were meant to work around the standard selection problem.

Fixes: #19496
2019-07-24 07:40:30 -04:00
Brad King
9cb5f040d7 XL: De-duplicate shared object creation flags
The XL `-qmkshrobj` flag creates shared objects on all platforms.
Move the flag out of the per-platform modules into the per-compiler
module for XL.
2019-07-15 07:45:04 -04:00
Brad King
14f69fab54 Merge branch 'fortran-submodule-cray' into release-3.15
Merge-request: !3504
2019-07-11 13:01:02 -04:00
Brad King
4fc10431f0 Merge topic 'elseif'
f4ed56ab63 Fix elseif() in place of else()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !3515
2019-07-10 09:26:39 -04:00
Brad King
45030c5a24 Merge topic 'iar-riscv'
c242187875 IAR: Add support for the RISC-V compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3510
2019-07-09 09:35:01 -04:00
Stefan Andersson
c242187875 IAR: Add support for the RISC-V compiler 2019-07-08 13:11:45 -04:00
Brad King
58d10debe1 Merge topic 'fortran-submodule-cray'
b0bcd4d7d2 Fortran: Add support for submodules on Cray
33de4d27eb Fortran: Support compilers using no module prefix on submodule files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3504
2019-07-08 11:43:39 -04:00
Willem Deconinck
b0bcd4d7d2 Fortran: Add support for submodules on Cray
Define `CMAKE_Fortran_SUBMODULE_{SEP,EXT}` for the Cray Fortran
compiler.  Use an empty separator to tell CMake that this compiler does
not use the enclosing module name as a prefix on submodule files.

Issue: #18925
2019-07-08 11:28:27 -04:00
Artalus
f4ed56ab63 Fix elseif() in place of else() 2019-07-03 11:57:53 +03:00
Robert Maynard
63bf207cd6 CompileFeatures: document why lambda_init_captures requires GCC 4.9 2019-06-17 09:20:03 -04:00
Francisco Facioni
d91b5a72cd Ninja: Add support for CUDA nvcc response files 2019-06-03 11:53:27 -04:00
Brad King
067a4f484b Merge topic 'clang-gnulike-support'
74829f01b1 Help: Add notes for topic 'clang-gnulike-support'
19669abe1d Tests: handle string escaping differences with NMake+clang
a2a90f41e3 Tests: require C++14 for the Tutorial
4819ff9647 Tests: fix failures with gnu mode clang on windows
26af0b25e7 cmake: use correct stack size with gnu mode clang on windows
d44c0db0b2 clang: setup correct configuration in gnu mode
b7d5ef23e9 cmGlobalNinjaGenerator: use gnu compatible paths with clang in gnu mode
3d0210d8dc binutils: add the llvm-* variants to the tool lists.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Francesco Bertolaccini <francesco@bertolaccini.dev>
Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com>
Acked-by: Saleem Abdulrasool <compnerd@compnerd.org>
Merge-request: !2992
2019-05-29 09:22:12 -04:00
Zsolt Parragi
d44c0db0b2 clang: setup correct configuration in gnu mode 2019-05-23 23:35:33 +02:00
Ben Boeckel
32e4f236b7 ARMClang: fix policy manipulation in the compiler module
Policies have their own scoping and cannot be set within a function
without affecting callers.
2019-05-23 09:19:59 -04:00
Brad King
64a7f491ef Merge topic 'armclang'
7b0abaac31 ARMClang: Add support for Clang-based ARM compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3315
2019-05-16 10:27:44 -04:00
Brad King
9ee24ede73 Merge topic 'msvc-jmc'
2a9ff9703e MSVC: Add support for /JMC (Just My Code)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3121
2019-05-15 14:06:58 -04:00
Johan Stridkvist
7b0abaac31 ARMClang: Add support for Clang-based ARM compiler
Fixes: #18215
2019-05-14 14:59:55 -04:00
Luca Cappa
2a9ff9703e MSVC: Add support for /JMC (Just My Code) 2019-05-14 13:27:18 -04:00
Brad King
730d8a135e Merge topic 'relax_cxx_relaxed_constexpr_requirements'
d156f8f5a2 CompileFeatures: Record when MSVC gained full CXX14 support
62dbe53a8a CompileFeatures: Record when Intel gained full CXX14 support
1ebb0d79fe CompileFeatures: Relax cxx_relaxed_constexpr compiler requirements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3292
2019-05-14 10:53:24 -04:00
Brad King
e0ab9e1cb9 Merge topic 'apple_clang_cxx_20_support'
9523ca72e2 Features: Activate C++20 support for AppleClang 10.0+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3294
2019-05-14 10:52:17 -04:00
Robert Maynard
d156f8f5a2 CompileFeatures: Record when MSVC gained full CXX14 support
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++14 feature support when the
running compiler is known to have all features.
2019-05-13 13:13:09 -04:00
Robert Maynard
62dbe53a8a CompileFeatures: Record when Intel gained full CXX14 support
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++14 feature support when the
running compiler is known to have all features.
2019-05-13 13:12:47 -04:00
Robert Maynard
1ebb0d79fe CompileFeatures: Relax cxx_relaxed_constexpr compiler requirements
This in effect means that cxx_relaxed_constexpr is now supported
by MSVC and Intel 18.0-18.04.
2019-05-13 13:11:32 -04:00
Brad King
3429369634 Merge topic 'apple_clang_full_cxx_14_support'
daad51c3b7 CompileFeatures: Record when AppleClang gained full CXX14 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3293
2019-05-13 10:13:52 -04:00
Stefan Andersson
4178096493 IAR: Add architecture support for RL78, RH850 and MSP430 2019-05-08 12:55:18 -04:00
Robert Maynard
9523ca72e2 Features: Activate C++20 support for AppleClang 10.0+ 2019-05-07 16:24:08 -04:00
Robert Maynard
daad51c3b7 CompileFeatures: Record when AppleClang gained full CXX14 support
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++14 feature support when the
running compiler is known to have all features.
2019-05-07 13:33:40 -04:00
Robert Maynard
3dbec53255 CompileFeatures: Record when compilers gained full CXX14 support
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++14 feature support when the
running compiler is known to have all features.
2019-05-02 10:23:25 -04:00
Brad King
fb325daa55 Merge topic 'IAR_6_x_fix'
4d78bea5df IAR: Fail early in case of IAR ARM 4.XX
0b684524ac IAR: Fix building with IAR ARM 6.X

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3263
2019-05-01 12:42:29 -04:00
Brad King
13b73ff65f Merge topic 'iar-binutils'
01a4eec446 IAR: Changes required for Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3262
2019-05-01 12:41:30 -04:00
Brad King
34d67a2405 Merge topic 'memorize_cxx_compilers_with_full_CXX11_support'
8d45a2ffe0 CompileFeatures: Record when compilers gained full CXX11 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3232
2019-05-01 12:40:15 -04:00
Brad King
71371e3d93 Merge topic 'msvc-c-features'
eca275f63d CompileFeatures: Fix hard-coded MSVC C features

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3247
2019-04-30 09:59:57 -04:00
Robert Maynard
8d45a2ffe0 CompileFeatures: Record when compilers gained full CXX11 support
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++11 feature support when the
running compiler is known to have all features.
2019-04-29 17:18:45 -04:00
Daniel Schürmann
4d78bea5df IAR: Fail early in case of IAR ARM 4.XX
This version is not yet supported because it uses xlink unsetad of ilink.
2019-04-26 10:15:01 +02:00
R. Andrew Ohana
a893018c47 Project: Report intel's simulation of gcc. 2019-04-25 13:37:44 -07:00
Daniel Schürmann
0b684524ac IAR: Fix building with IAR ARM 6.X
Use the correct version macros and version numbers.
2019-04-25 15:25:16 +02:00
Stefan Andersson
01a4eec446 IAR: Changes required for Linux 2019-04-25 11:28:58 +02:00
Brad King
eca275f63d CompileFeatures: Fix hard-coded MSVC C features
In commit 8e4899fd6c (CompileFeatures: Record which C features the MSVC
compiler supports, 2019-04-12) our `cmake_record_c_compile_features`
macro was accidentally left not setting the `_result` variable, which
had previously been set by `_record_compiler_features`.  The variable is
expected by the call site in `cmake_determine_compile_features` and used
to switch between "failed" and "done" reports.  Set it now.

Also record `c_variadic_macros` only for cl 14 (VS 2005) and higher
because it is not supported before that version.
2019-04-22 08:22:54 -04:00
Brad King
66f3f11af5 SunPro: Record support for C++14 features by SunPro 5.{14,15}
SunPro 5.15 supports `-std=c++14` and several C++14 features.

SunPro 5.14 accepts `-std=c++14` but does not update its definition of
`__cplusplus` or any other macro to distinguish it from `-std=c++11`,
so we need to blacklist a couple features that do work but that we
cannot report for that version.  We can still support `cxx_std_14`.

Co-Author: Robert Maynard <robert.maynard@kitware.com>
2019-04-19 09:14:00 -04:00
Brad King
a000ec7a08 Merge topic 'add_xl_cxx14_support'
458ea9d76c XL: Add C++14 language level flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3235
2019-04-18 11:03:12 -04:00
Brad King
5cd187147e Merge topic 'memorize_msvc_like_compilers_C_support'
8e4899fd6c CompileFeatures: Record which C features the MSVC compiler supports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3226
2019-04-17 10:58:49 -04:00
Robert Maynard
458ea9d76c XL: Add C++14 language level flags 2019-04-15 12:38:03 -04:00
Brad King
8b667f24d4 Merge topic 'iar-generalize'
ea83d0f8fb IAR: Generalize and add support for IAR RX compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3196
2019-04-15 10:53:35 -04:00
Robert Maynard
8e4899fd6c CompileFeatures: Record which C features the MSVC compiler supports
Use the infrastructure added by commit f92ccbc306
(CompileFeatures: memoize C compilers with full language level support)
to avoid using a `try_compile` to check for C 90/99/11 feature support when the running compiler is known to have a fixed set of feature support.
2019-04-12 14:39:57 -04:00
Stefan Andersson
ea83d0f8fb IAR: Generalize and add support for IAR RX compiler
Moved common ASM setup to the common macros and changed version check.
2019-04-12 09:10:02 +02:00
Robert Maynard
239a8a0266 CompileFeatures: Record when CXX compilers have gained full support for 98
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++98 feature support when the
running compiler is known to have all features.
2019-04-11 11:20:48 -04:00
Brad King
876680e94b Merge topic 'meta-feature_only_infer_granular_support'
613ac56e50 Add a test to verify meta-feature parity with granular features
b0f46c48f6 CompileFeatures: Now able to presume full language level support
646fb1a646 CompileFeatures: memoize C++ compilers with full language level support
0d641fcfad Tests: Remove outdated portion of CompileFeatures genex test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3176
2019-04-10 08:49:21 -04:00
Robert Maynard
b0f46c48f6 CompileFeatures: Now able to presume full language level support
Previously compilers that only supported the meta-level flags
would not have any of the granular features listed. Now we
presume that they have full support and enable all the features.

Update granular feature tests to skip the actual compilation
checks for the presumed features.
2019-04-09 08:44:56 -04:00
Robert Maynard
646fb1a646 CompileFeatures: memoize C++ compilers with full language level support
Previously compilers that had full support for a language standard level
were still verified every time a new build directory was created.  Now
we record this information and insert the correct granular compile
features instead of doing a `try_compile`.
2019-04-09 08:44:56 -04:00