aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-07-21 17:35:29 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-07-21 17:35:29 +0400
commitfd6c856b34c8fda53b7e45e3dcc17625206ed4fb (patch)
treeb4c8d1c62937038cb39bdcf7879110525fb05480 /CMakeLists.txt
parent875d1dd367eb433ae77a092148f483e9b9449a47 (diff)
downloadrspamd-fd6c856b34c8fda53b7e45e3dcc17625206ed4fb.tar.gz
rspamd-fd6c856b34c8fda53b7e45e3dcc17625206ed4fb.zip
Add workaround for clang under linux.
Fix problems found by static analyzing.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c048bd7d1..ebc2ee847 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,7 +43,6 @@ INCLUDE(FindPerl)
# Initial set
SET(CMAKE_REQUIRED_LIBRARIES m)
-SET(CMAKE_REQUIRED_INCLUDES sys/mman.h stdlib.h stdio.h unistd.h time.h sched.h)
IF(CMAKE_INSTALL_PREFIX)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
@@ -127,7 +126,13 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
IF(NOT MAN_PREFIX)
SET(MAN_PREFIX /usr/share/man)
ENDIF(NOT MAN_PREFIX)
- ENDIF(CMAKE_INSTALL_PREFIX)
+ ENDIF(CMAKE_INSTALL_PREFIX)
+
+ # Workaround with architecture specific includes
+ IF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
+ INCLUDE_DIRECTORIES("/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
+ SET(CMAKE_REQUIRED_INCLUDES "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
+ ENDIF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)