From fd6c856b34c8fda53b7e45e3dcc17625206ed4fb Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 21 Jul 2011 17:35:29 +0400 Subject: Add workaround for clang under linux. Fix problems found by static analyzing. --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3