summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-11-04 00:15:43 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-05-14 22:15:18 (GMT)
commite0890d03a48d12904ffe24aa94fb2847d8d5f4e7 (patch)
tree820631dcc5cd8c95111dbfa7d33e1a59d554f8a4 /Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
parent775458dede98d28fe81ac878541a6ead735443fc (diff)
downloadCMake-e0890d03a48d12904ffe24aa94fb2847d8d5f4e7.zip
CMake-e0890d03a48d12904ffe24aa94fb2847d8d5f4e7.tar.gz
CMake-e0890d03a48d12904ffe24aa94fb2847d8d5f4e7.tar.bz2
Features: Extend concept to C language.
Add properties and variables corresponding to CXX equivalents. Add features for c_function_prototypes (C90), c_restrict (C99), c_variadic_macros (C99) and c_static_assert (C11). This feature set can be extended later. Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader to conditionally represent the c_restrict feature.
Diffstat (limited to 'Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
index bb4e0f9..a23d44f 100644
--- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
@@ -10,10 +10,19 @@ run_cmake(NotAFeature_OriginDebug_target_compile_features)
run_cmake(generate_feature_list)
file(READ
+ "${RunCMake_BINARY_DIR}/generate_feature_list-build/c_features.txt"
+ C_FEATURES
+)
+file(READ
"${RunCMake_BINARY_DIR}/generate_feature_list-build/cxx_features.txt"
CXX_FEATURES
)
+if (NOT C_FEATURES)
+ run_cmake(NoSupportedCFeatures)
+ run_cmake(NoSupportedCFeaturesGenex)
+endif()
+
if (NOT CXX_FEATURES)
run_cmake(NoSupportedCxxFeatures)
run_cmake(NoSupportedCxxFeaturesGenex)