summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4b13dd7..691e268 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -93,8 +93,13 @@ install(FILES cmark.h ${CMAKE_CURRENT_BINARY_DIR}/cmark_export.h
DESTINATION include
)
-include (CheckIncludeFile)
-CHECK_INCLUDE_FILE (stdbool.h HAVE_STDBOOL_H)
+# Feature tests
+include(CheckIncludeFile)
+include(CheckCSourceCompiles)
+CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
+CHECK_C_SOURCE_COMPILES(
+ "int main() { __builtin_expect(0,0); return 0; }"
+ HAVE___BUILTIN_EXPECT)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/config.h.in