Commit Graph

563 Commits

Author SHA1 Message Date
Robert Maynard
2467a2b318 CUDA: Add cuda meta-features (e.g. `cuda_std_11`) support 2019-12-10 17:56:48 -05:00
Brad King
b2634d639b Merge topic 'cuda_updates_for_10.2'
5341f5e4a1 CUDA: get header deps from compiler invocation when possible
7f15c99851 CUDA: forward unknown flags to host compiler when possible.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4099
2019-12-09 11:21:58 -05:00
Brad King
a795aa145c Merge topic 'pch-xcode-no-warning'
df8372da09 PCH: Do not add #pragma system_header for Xcode generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4098
2019-12-05 11:39:24 -05:00
Cristian Adam
df8372da09 PCH: Do not add #pragma system_header for Xcode generator
Fixes: #20039
2019-12-04 12:56:53 -05:00
Robert Maynard
5341f5e4a1 CUDA: get header deps from compiler invocation when possible
Before CUDA 10.2 `nvcc` didn't support providing header dependency
information while compiling.
2019-11-29 14:21:35 -05:00
Robert Maynard
7f15c99851 CUDA: forward unknown flags to host compiler when possible.
Starting with CUDA 10.2 the nvcc compiler has gained support
to automatically forward unknown flags to the host compiler.

This behavior is highly desired as projcts that mix CUDA, C, C++
run into situation where flags such as `-pthread` which aren't
supported by nvcc, are being applied to all source files and
therefore break CUDA compilation.
2019-11-29 14:21:35 -05:00
Brad King
19f267c75e XL: Add support for Ninja and XL Fortran
The Ninja generator's support for Fortran requires that source files
be preprocessed explicitly first.  However, the `xlf` compiler does
not have a simple `-E` option or equivalent to do preprocessing.
The only documented way to get preprocessed output is to use `-d`
to leave it behind, but only at an inflexible location.

Instead, create our own `cpp` wrapper script and substitute it for the
real preprocessor using `-tF -B ...`.  Teach the wrapper to map the
`cpp` output to the location we need and then invoke the real `cpp`
underneath.

Fixes: #19450
2019-11-21 15:59:12 -05:00
Brad King
0f1458022d Merge topic 'revert-FindBinUtils-ask-compiler' into release-3.16
b2857514b0 FindBinUtils: Revert "Use the compiler to get the path to compiler tools"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4009
2019-11-08 09:41:05 -05:00
Brad King
9f7ca15de6 Merge topic 'revert-FindBinUtils-ask-compiler'
b2857514b0 FindBinUtils: Revert "Use the compiler to get the path to compiler tools"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4009
2019-11-08 09:41:05 -05:00
Brad King
b2857514b0 FindBinUtils: Revert "Use the compiler to get the path to compiler tools"
Revert commit b2fd479df5 (FindBinUtils: Use the compiler to get the path
to compiler tools, 2019-09-22, v3.16.0-rc1~51^2).  The compiler's answer
may incorrectly come from the `PATH`.  Another approach will be needed.

Fixes: #19934
2019-11-07 10:31:02 -05:00
Brad King
13ea5f06fa Merge topic 'objc-pch'
e331367a89 PCH: Add support for OBJC/OBJCXX languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3983
2019-11-05 11:24:55 -05:00
Cristian Adam
e331367a89 PCH: Add support for OBJC/OBJCXX languages 2019-11-03 21:34:39 +01:00
Alex Turbov
7b2dd9dedc Refactor: Use added message types in various modules
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2019-11-02 14:10:09 +02:00
Micael Borgefeldt
5652e11ea1 IAR: Add 8051 support
Issue: #17264
2019-10-11 10:22:52 -04:00
Micael Borgefeldt
6e51db9a40 IAR: Fix v850 assembler support file extensions
Fix the file extension added by commit 158f3795b8 (IAR: Add v850
assembler support, 2019-09-23, v3.16.0-rc1~70^2).

Issue: #17264
2019-10-11 10:22:52 -04:00
Cristian Adam
bc4f8f4472 PCH: Use clang's own pch functionality instead of the GCC emulation
Fixes: #19786
2019-10-03 14:43:00 +02:00
Brad King
9b03baee30 Merge topic 'objective-c-cxx'
dd0f304613 Objective C/C++: Add compiler standard detection
b515af782b Help: Add release note for Objective-C/C++ language support
9e66397c28 Languages: Add support for Objective-C++
80f120a85f Languages: Add support for Objective-C

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3811
2019-09-30 10:25:19 -04:00
Steve Wilson
9e66397c28 Languages: Add support for Objective-C++
Add entries in Modules and Modules/Platform to support
Objective-C++ compiler determination and identification.
Add Modules to check Objective-C++ compiler flags, source
compilations, program checks, etc...

Use OBJCXX as the designator of the language, eg:

project(foo OBJCXX)

Add various tests for Objective-C++ language features.  Add
tests to preserve C++ handling of .M and .mm files when
Objective-C++ is not a configured language.

Co-authored-by: Cristian Adam <cristian.adam@gmail.com>
2019-09-28 15:56:53 +02:00
Steve Wilson
80f120a85f Languages: Add support for Objective-C
Add entries in Modules and Modules/Platform to support
Objective-C compiler determination and identification.
Add Modules to check Objective-C compiler flags, source
compilations, program checks, etc...

Use OBJC as the designator of the language, eg:

project(foo OBJC)

Add various tests for Objective-C language features.  Add
tests to preserve C++ handling of .m and .mm files when
OBJC is not a configured language.

Co-Authored-By: Cristian Adam <cristian.adam@gmail.com>
2019-09-28 15:56:46 +02:00
Brad King
c88cf48bbe Merge topic 'FindBinUtils-ask-compiler'
b2fd479df5 FindBinUtils: Use the compiler to get the path to compiler tools
587ccffe74 Tests: Add symbols to FortranModules static libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !3854
2019-09-27 14:56:53 -04:00
Isuru Fernando
b2fd479df5 FindBinUtils: Use the compiler to get the path to compiler tools
Fixes: #19728
2019-09-26 19:11:00 -05:00
Nico Mueller
158f3795b8 IAR: Add v850 assembler support
Assembler compiler configuration for 'v850' architecture

Issue: #17264
2019-09-23 13:14:14 +02:00
Nico Mueller
bd5006e813 IAR: Add v850 support
Add compiler identification for V850.

Issue: #17264
2019-09-16 11:07:04 -04:00
Brad King
fb9da8e6f4 Ninja: Pass preprocessor definitions when compiling with Intel Fortran
The Intel Fortran compiler supports an extension that allows conditional
compilation based on preprocessor definitions specified on the command
line even when not preprocessing.

Fixes: #19664
2019-09-03 14:20:26 -04:00
Cristian Adam
b8626261e9 Precompile headers: Add methods to generate PCH sources
Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
2019-08-28 11:47:40 -04:00
Brad King
76891a4a7a Merge topic 'CrayPrgEnv-update-link-type-detection'
971c778213 CrayPrgEnv: Change default linking mode based on PE version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3716
2019-08-23 10:05:52 -04:00
Chuck Atkins
971c778213 CrayPrgEnv: Change default linking mode based on PE version
Beginning with the 19.06 release of the Cray Programming Environment, the
default linking mode on XC Cray systems is dynamic instead of static.
This updates the CrayPrgEnv compiler wrappers to detect the PE version
being used and behave accordingly.
2019-08-22 12:26:06 -04:00
Robert Maynard
a233e4e7d9 CUDA: Compilers can now state they don't require a device linking step 2019-08-06 15:44:15 -04:00
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