diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-12 21:48:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-12-22 15:44:41 (GMT) |
commit | bd6b42c1864dc1915e5c86cceb609e87f72f93b6 (patch) | |
tree | 1d0a4ad1d2f954dd5e4316f12e838a15a9795138 /Modules/Compiler/AppleClang-C-FeatureTests.cmake | |
parent | b341799e53e468a02bca78e3270e60ddccf8b4f3 (diff) | |
download | CMake-bd6b42c1864dc1915e5c86cceb609e87f72f93b6.zip CMake-bd6b42c1864dc1915e5c86cceb609e87f72f93b6.tar.gz CMake-bd6b42c1864dc1915e5c86cceb609e87f72f93b6.tar.bz2 |
Features: Record for AppleClang 5.1
Apple's Clang 5.1 already supports most of the C and C++ features CMake
enumerates.
Diffstat (limited to 'Modules/Compiler/AppleClang-C-FeatureTests.cmake')
-rw-r--r-- | Modules/Compiler/AppleClang-C-FeatureTests.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/Compiler/AppleClang-C-FeatureTests.cmake b/Modules/Compiler/AppleClang-C-FeatureTests.cmake new file mode 100644 index 0000000..ec1d43f --- /dev/null +++ b/Modules/Compiler/AppleClang-C-FeatureTests.cmake @@ -0,0 +1,11 @@ + +set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") + +set(AppleClang_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L") +set(_cmake_feature_test_c_static_assert "${AppleClang_C11}") +set(AppleClang_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L") +set(_cmake_feature_test_c_restrict "${AppleClang_C99}") +set(_cmake_feature_test_c_variadic_macros "${AppleClang_C99}") + +set(AppleClang_C90 "${_cmake_oldestSupported} && !defined(__STDC_VERSION__)") +set(_cmake_feature_test_c_function_prototypes "${AppleClang_C90}") |