mirror of
https://github.com/Kitware/CMake.git
synced 2026-06-24 08:47:59 +00:00
Extend commit c37e279014 (Tests/CompileFeatures: Cover c_std_## and
cxx_std_## meta-features, 2024-04-02, v3.30.0-rc1~279^2~1) to cover the
per-language standard level target properties.
13 lines
627 B
C++
13 lines
627 B
C++
#include "cxx_std.h"
|
|
#if defined(CXX_STD) && CXX_STD > CXX_STD_14
|
|
# error "CXX_STANDARD 14 honored as higher standard"
|
|
#endif
|
|
#if defined(CXX_STD) && CXX_STD <= CXX_STD_11 && \
|
|
!(CXX_STD == CXX_STD_11 && \
|
|
((defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 4 && \
|
|
__GNUC_MINOR__ <= 8 && !defined(__clang__) && \
|
|
!defined(__INTEL_COMPILER) && !defined(__PGI)) || \
|
|
(defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5150)))
|
|
# error "CXX_STANDARD 14 not honored"
|
|
#endif
|