summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-12 13:12:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-12 13:12:48 (GMT)
commit040de18b36cddba470684e73f3a6bdcaa28474bd (patch)
tree6f05dbfafaa5372d6fbdf58ecc3d018e81335f0a /Tests/CompileFeatures
parent8843120ded39b90423afd48ebfde4c059d9495ed (diff)
parent5d13fe282255d828f7aaf7765a1b069839161ee8 (diff)
downloadCMake-040de18b36cddba470684e73f3a6bdcaa28474bd.zip
CMake-040de18b36cddba470684e73f3a6bdcaa28474bd.tar.gz
CMake-040de18b36cddba470684e73f3a6bdcaa28474bd.tar.bz2
Merge topic 'sunpro-c-features'
5d13fe28 Features: Record features for SunPro C 5.13 and 5.14 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !832
Diffstat (limited to 'Tests/CompileFeatures')
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt10
-rw-r--r--Tests/CompileFeatures/default_dialect.c3
2 files changed, 12 insertions, 1 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 2a307d0..bb18543 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -239,6 +239,16 @@ if (CMAKE_C_COMPILE_FEATURES)
EXPECT_C_STATIC_ASSERT=0
)
endif()
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "SunPro")
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.13)
+ list(APPEND expected_defs
+ EXPECT_C_STATIC_ASSERT=1
+ )
+ else()
+ list(APPEND expected_defs
+ EXPECT_C_STATIC_ASSERT=0
+ )
+ endif()
endif()
list(APPEND expected_defs
diff --git a/Tests/CompileFeatures/default_dialect.c b/Tests/CompileFeatures/default_dialect.c
index 0e67095..4debd94 100644
--- a/Tests/CompileFeatures/default_dialect.c
+++ b/Tests/CompileFeatures/default_dialect.c
@@ -11,7 +11,8 @@
#if !DEFAULT_C90
#error Buildsystem error
#endif
-#if defined(__STDC_VERSION__)
+#if defined(__STDC_VERSION__) && \
+ !(defined(__SUNPRO_C) && __STDC_VERSION__ == 199409L)
#error Unexpected __STDC_VERSION__ definition
#endif
#endif