summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-02-03 16:39:37 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2019-02-04 15:21:32 +0100
commit2cc1b3a3ee595c8be761fee309167b8a56393d3e (patch)
treeb6d6639a2a8334db771d78025b3af7f9838dce4b /CMakeLists.txt
parentcde5ee8fe527d3d672775909d27110d11c393774 (diff)
Detect function multiversioning and sse4.2/crc32, enables i386
This fixes the build on kfreebsd-amd64, and due to the detection of sse4.2, should also enable the sse4.2 on i386.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b3cc73de..599c7ec1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,6 +180,11 @@ else()
set(RESOLV_LIBRARIES -lresolv)
endif()
+# Check multiversioning
+include(CheckCxxTarget)
+check_cxx_target(HAVE_FMV_SSE42_AND_CRC32 "sse4.2" "__builtin_ia32_crc32si(0, 1llu);")
+check_cxx_target(HAVE_FMV_SSE42_AND_CRC32DI "sse4.2" "__builtin_ia32_crc32di(0, 1llu);")
+
# Configure some variables like package, version and architecture.
set(PACKAGE ${PROJECT_NAME})
set(PACKAGE_MAIL "APT Development Team <deity@lists.debian.org>")