diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-09 10:12:59 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-09 10:12:59 +0000 |
commit | 369799644bb0536ce104e84eefde3938d4a0abd0 (patch) | |
tree | 3a902be8f6394b27379111b521c7e5bf97baa004 /CMakeLists.txt | |
parent | 896a33677ab75df338ed107c55a602e7cfa043fa (diff) | |
download | rspamd-369799644bb0536ce104e84eefde3938d4a0abd0.tar.gz rspamd-369799644bb0536ce104e84eefde3938d4a0abd0.zip |
One more push to pthread_mutexattr_setpshared
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ca788594..050117b4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -760,14 +760,18 @@ FILE(WRITE ${CMAKE_BINARY_DIR}/pthread_setpshared.c " #include <stdlib.h> int main (void) { - pthread_mutex_attr_t mattr; + pthread_mutexattr_t mattr; if (pthread_mutexattr_init(&mattr) != 0) return 0; if (pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED) != 0) return 0; return 1; } ") -TRY_RUN(HAVE_PTHREAD_PROCESS_SHARED _CAN_COMPILE - "${CMAKE_BINARY_DIR}" "${CMAKE_BINARY_DIR}/pthread_setpshared.c") +TRY_RUN(_CAN_RUN _CAN_COMPILE + "${CMAKE_BINARY_DIR}" "${CMAKE_BINARY_DIR}/pthread_setpshared.c" + CMAKE_FLAGS CMAKE_C_FLAGS="-pthread") +IF(_CAN_RUN EQUAL 1) + SET(HAVE_PTHREAD_PROCESS_SHARED) +ENDIF(_CAN_RUN EQUAL 1) IF(HAVE_PTHREAD_PROCESS_SHARED) MESSAGE(STATUS "pthread_mutexattr_setpshared is supported") ELSE(HAVE_PTHREAD_PROCESS_SHARED) |