diff include/freeDiameter/CMakeLists.txt @ 853:16428c4ecb22

Remove testfifo if pthread_barriers are not available
author Sebastien Decugis <sdecugis@freediameter.net>
date Sun, 21 Oct 2012 17:41:02 +0200
parents d7f940afd933
children 254d81d21d0b
line wrap: on
line diff
--- a/include/freeDiameter/CMakeLists.txt	Sun Oct 21 17:27:31 2012 +0200
+++ b/include/freeDiameter/CMakeLists.txt	Sun Oct 21 17:41:02 2012 +0200
@@ -168,6 +168,12 @@
 CHECK_SYMBOL_EXISTS(AI_ADDRCONFIG "netdb.h" HAVE_AI_ADDRCONFIG)
 
 
+# Check if barriers are available (for test_fifo)
+SET(CMAKE_REQUIRED_INCLUDES "pthread.h")
+SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+CHECK_FUNCTION_EXISTS (pthread_barrier_wait HAVE_PTHREAD_BAR)
+SET(HAVE_PTHREAD_BAR ${HAVE_PTHREAD_BAR} PARENT_SCOPE)
+
 
 ##########################
 
"Welcome to our mercurial repository"