Commit Graph

15 Commits

Author SHA1 Message Date
Brad King
3b4d0df670 NVCC: Detect host compiler id and version
Report them in `CMAKE_<LANG>_HOST_COMPILER_{ID,VERSION}` variables.

Fixes: #20901
2024-09-20 17:48:33 -04:00
Brad King
138436609f CUDA: Fix detection of default C++ standard level with MSVC host compiler 2024-04-18 08:30:38 -04:00
Raul Tambre
2038f2c2b1 C++26: Support detection as the default standard
This was missed in commit f808d8afb9 (CMake: Support upcoming C++26
language level, 2022-08-19, v3.25.0-rc1~218^2).
2024-04-16 15:34:57 -04:00
Brad King
dcbc2ef00d CompilerId: Clarify CUDA, HIP, ObjC, ObjC++ standard level detection
Use named constants.  Regularize comparison patterns.  Follow the
approach from commit b9d4db7098 (CompilerId: Clarify C and C++ standard
level detection, 2024-04-02).
2024-04-16 15:31:36 -04:00
Brad King
4ef6e27cb9 CompilerId: Fix default extensions check for Clang targeting MSVC ABI
In commit fc3a1cbdd8 (CompilerID: Compiler extensions default detection,
2021-05-29, v3.22.0-rc1~52^2~2), extensions were assumed to be `OFF`
for Clang targeting the MSVC ABI.  However, the `clang` and `clang++`
tools both seem to have extensions enabled by default even when
targeting the MSVC ABI.

This can be observed with the `RunCMake.CompileFeatures` test.
It fails with the GNU-like `clang/clang++` front-end, but removing
the above special case makes it pass.  The test passes either way
with the MSVC-like `clang-cl` front-end.
2022-02-03 12:06:00 -05:00
Brad King
0fc8b2f61c CompilerId: Restore support for classic C by avoiding C++ style comments
C++ style comments were added by commit fc3a1cbdd8 (CompilerID: Compiler
extensions default detection, 2021-05-29, v3.22.0-rc1~52^2~2), but they
may not be supported by the default mode of some C compilers.  Use
C-style comments instead.  For consistency, do this for all languages.

Fixes: #22942
2021-11-23 10:00:31 -05:00
Raul Tambre
fc3a1cbdd8 CompilerID: Compiler extensions default detection 2021-09-28 21:24:53 +03:00
Raul Tambre
2adfd95d79 CompilerID: Rename language_dialect to language_standard
In Linux C++ terms dialect usually refers to having GNU extensions or not.
Change the name to better reflect that this is about the standard version.
2021-09-28 21:24:53 +03:00
Raul Tambre
9f3c70a333 CUDA, CXX, OBJCXX: C++23 support with Clang 12
Clang 12 landed initial support for C++23 language mode flag -std={c|gnu}++2b
in commit 6627a3c2873fdf7ccba1a1573371079be48b36e8.
2020-12-08 18:43:59 +02:00
Robert Maynard
2467a2b318 CUDA: Add cuda meta-features (e.g. `cuda_std_11`) support 2019-12-10 17:56:48 -05:00
Brad King
7fe580a362 Features: Add infrastructure for C++ 20 language standard
Issue: #17849
2018-03-27 07:40:54 -04:00
Brad King
65c1e012ff CUDA: Detect use of MSVC host compiler
Report it in `CMAKE_CUDA_SIMULATE_{ID,VERSION}`.
2017-01-12 10:39:02 -05:00
Brad King
ae1a6815b6 Features: Add infrastructure for C++ 17 language standard
Issue: #16468
2016-12-02 11:22:46 -05:00
Robert Maynard
aaeee1ca72 CUDA: CompilerId now errors out properly when passed a non CUDA compiler.
Previously we only reported an error if the compiler was a C compiler.
2016-11-14 11:36:43 -05:00
Robert Maynard
f8aac21947 CUDA: Add basic CUDA language support for *NIX systems. 2016-11-14 11:36:42 -05:00