summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-07-24 13:34:10 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-07-24 20:33:33 +0100
commit1a634c3d5103c9deb6f5fe1c236b5719995f8d11 (patch)
treefa2b665bc2bc8a88880d3c00c516d4645a5f5cff /cmake
parent9dbae7439d0c01c29566fc0df2cf59c5e5e1aed7 (diff)
downloadrspamd-1a634c3d5103c9deb6f5fe1c236b5719995f8d11.tar.gz
rspamd-1a634c3d5103c9deb6f5fe1c236b5719995f8d11.zip
[Project] Detect memrchr in systems that supports it
Diffstat (limited to 'cmake')
-rw-r--r--cmake/OSDep.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/OSDep.cmake b/cmake/OSDep.cmake
index a48f9d17b..ce90ebb02 100644
--- a/cmake/OSDep.cmake
+++ b/cmake/OSDep.cmake
@@ -1,6 +1,7 @@
# Platform specific configuration
IF(CMAKE_SYSTEM_NAME MATCHES "^.*BSD$|DragonFly")
ADD_COMPILE_OPTIONS(-DFREEBSD -D_BSD_SOURCE)
+ SET(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_BSD_SOURCE")
CONFIGURE_FILE(freebsd/rspamd.sh.in freebsd/rspamd @ONLY)
MESSAGE(STATUS "Configuring for BSD system")
# Find util library
@@ -32,6 +33,7 @@ ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ADD_COMPILE_OPTIONS(-D_GNU_SOURCE -DLINUX)
+ SET(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
# Workaround with architecture specific includes
#IF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
# INCLUDE_DIRECTORIES("/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")