diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-09-16 14:22:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-09-16 14:22:42 +0100 |
commit | 3ca5e9bdce7e7bc0a9f3e218989e8ace5c675c2f (patch) | |
tree | bc137a8eacb6f170aa99f579aad3627384964892 /CMakeLists.txt | |
parent | 986814257147e9e79df032f5f157d90c0ee430e4 (diff) | |
download | rspamd-3ca5e9bdce7e7bc0a9f3e218989e8ace5c675c2f.tar.gz rspamd-3ca5e9bdce7e7bc0a9f3e218989e8ace5c675c2f.zip |
[Minor] Detect __builtin_cpu_supports
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a9bb50642..44ebd8c3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -472,6 +472,13 @@ int main(int argc, char **argv) { } " HAVE_ATOMIC_BUILTINS) +CHECK_C_SOURCE_RUNS("#include <stdio.h> +int main() { + __builtin_cpu_init(); + printf(\"%d\", __builtin_cpu_supports(\"avx\")); + return 0; +}" HAVE_BUILTIN_CPU_SUPPORTS) + IF (NOT HAVE_ATOMIC_BUILTINS) MESSAGE(STATUS "atomic builtins are -NOT- supported") ELSE () |