diff options
author | Brad King <brad.king@kitware.com> | 2024-04-03 18:26:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-04-05 11:38:14 (GMT) |
commit | 80a5a865142a48bd25e27533683d040adc7d885a (patch) | |
tree | dc72920118a744438a57f6c4544921c1c8062560 /Tests/CompileFeatures | |
parent | c9cc3dc6460e32741f42d015343a65beca7482c9 (diff) | |
download | CMake-80a5a865142a48bd25e27533683d040adc7d885a.zip CMake-80a5a865142a48bd25e27533683d040adc7d885a.tar.gz CMake-80a5a865142a48bd25e27533683d040adc7d885a.tar.bz2 |
GNU: Fix detection of C++ 11 mode in GCC 4.{4,5,6}
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.
Diffstat (limited to 'Tests/CompileFeatures')
-rw-r--r-- | Tests/CompileFeatures/default_dialect.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/default_dialect.cpp b/Tests/CompileFeatures/default_dialect.cpp index b3ac4e7..f9b770b 100644 --- a/Tests/CompileFeatures/default_dialect.cpp +++ b/Tests/CompileFeatures/default_dialect.cpp @@ -47,6 +47,8 @@ struct Outputter; # else # define CXX_STD __cplusplus # endif +#elif __cplusplus == 1 && defined(__GXX_EXPERIMENTAL_CXX0X__) +# define CXX_STD CXX_STD_11 #else # define CXX_STD __cplusplus #endif |