summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/default_dialect.cpp
Commit message (Collapse)AuthorAgeFilesLines
* C++26: Support detection as the default standardRaul Tambre2024-04-161-1/+5
| | | | | This was missed in commit f808d8afb9 (CMake: Support upcoming C++26 language level, 2022-08-19, v3.25.0-rc1~218^2).
* Tests/CompileFeatures: Factor out headers to compute C and C++ standard levelsBrad King2024-04-051-51/+1
|
* GNU: Fix detection of C++ 11 mode in GCC 4.{4,5,6}Brad King2024-04-051-0/+2
| | | | | | These versions of the compiler have experimental C++11 support and so do not define `__cplusplus` correctly, but do define a feature macro we can use to distinguish this mode.
* PGI: Fix detection of C++ 14/17 modesBrad King2024-04-051-1/+1
| | | | The PGI compiler is based on EDG. Share conditions with Intel Classic.
* NVHPC: Fix detection of C++ 20 mode on NVHPC < 22.7Brad King2024-04-051-0/+6
| | | | | This compiler does not always define `__cplusplus` correctly, but does define a feature macro that we can use to distinguish this mode.
* XL/XLClang: Fix detection of C++ 14 mode on LinuxBrad King2024-04-041-0/+6
| | | | | This compiler does not always define `__cplusplus` correctly, but does define a feature macro that we can use to distinguish this mode.
* Intel: Fix detection of C++ 14/17 modes on Linux/macOSBrad King2024-04-041-0/+8
| | | | | | The Intel Classic C++ compiler is based on EDG. It does not always define `__cplusplus` correctly, but does define feature macros that we can use to distinguish these modes.
* Intel: Fix detection of C++ 17/20 modes on WindowsBrad King2024-04-041-8/+13
| | | | | | The Intel Classic C++ compiler for Windows does not always define `_MSVC_LANG` correctly, but does define feature macros that we can use to distinguish these modes.
* CompilerId: Clarify C and C++ standard level detectionBrad King2024-04-041-10/+18
| | | | Use named constants. Regularize comparison patterns.
* CUDA, CXX, OBJCXX: C++23 support with Clang 12Raul Tambre2020-12-081-1/+5
| | | | | Clang 12 landed initial support for C++23 language mode flag -std={c|gnu}++2b in commit 6627a3c2873fdf7ccba1a1573371079be48b36e8.
* Intel: Fix default C++ dialect detection on WindowsBrad King2019-10-101-1/+11
| | | | | | For the Intel Compiler for Windows we have some subtle preprocessor checks in compiler feature detection to detect C++11 and C++14 modes. Use these when detecting the default C++ dialect too.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-15/+16
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Features: Add infrastructure for C++ 20 language standardBrad King2018-03-271-1/+5
| | | | Issue: #17849
* MSVC: Add flags for C++ language standardsBrad King2017-07-171-9/+14
| | | | | | | | | | | 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
* Features: Add infrastructure for C++ 17 language standardBrad King2016-12-021-1/+5
| | | | Issue: #16468
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-10/+11
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Features: Update the default_dialect test for old GNU-like compilers.Stephen Kelly2015-01-151-1/+1
| | | | | Prior to GNU 4.7, GNU defined __cplusplus incorrectly, and defined __GXX_EXPERIMENTAL_CXX0X__ in C++11 mode.
* Features: Fix the default C dialect for Clang and GNU.Stephen Kelly2014-11-201-0/+25
Clang 3.4 uses C99 by default, and Clang 3.6 uses C11 by default: http://thread.gmane.org/gmane.comp.compilers.clang.devel/39379 GNU 4.9 uses C90 by default, and GNU 5.0 uses C11 by default: https://gcc.gnu.org/gcc-5/changes.html Test that the default compiler settings result in the expected dialect macros being defined for both C and CXX. Remove the unused main.c file from the CompileFeatures unit test.