diff options
author | Nick Wellnhofer <[email protected]> | 2014-11-16 16:10:45 +0100 |
---|---|---|
committer | Nick Wellnhofer <[email protected]> | 2014-11-16 22:17:35 +0100 |
commit | 627326bed4e58cf457e8c8f2c45b2e6d7c316a54 (patch) | |
tree | 90fb81020f409b82d55acd5ca58f1074e55bfd9d /src/CMakeLists.txt | |
parent | 485ef21b95e257e9d9cbcaa804c3c164f1f49a80 (diff) |
Feature test for __builtin_expect
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 9 |
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 |