mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Clang: Fix detection of C++26 when targeting MSVC ABI
`_MSVC_LANG` may not be defined higher than C++20, but `__cplusplus` is.
This commit is contained in:
@@ -57,7 +57,11 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
# define CXX_STD CXX_STD_98
|
||||
# endif
|
||||
#elif defined(_MSC_VER) && defined(_MSVC_LANG)
|
||||
# define CXX_STD _MSVC_LANG
|
||||
# if _MSVC_LANG > __cplusplus
|
||||
# define CXX_STD _MSVC_LANG
|
||||
# else
|
||||
# define CXX_STD __cplusplus
|
||||
# endif
|
||||
#elif defined(__NVCOMPILER)
|
||||
# if __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init)
|
||||
# define CXX_STD CXX_STD_20
|
||||
|
||||
Reference in New Issue
Block a user