mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-03 04:03:23 +03:00
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.
This commit is contained in:
1 parent
c9cc3dc646
commit
80a5a86514
2 files changed
+4
No files matched your search
@@ -78,6 +78,8 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user