# HG changeset patch # User Sebastien Decugis # Date 1350834062 -7200 # Node ID 16428c4ecb22a18d6d6362e8e7c2846ae9b6069c # Parent 5873c671490ff81294f0841cd97fc8ee98a0c5de Remove testfifo if pthread_barriers are not available diff -r 5873c671490f -r 16428c4ecb22 include/freeDiameter/CMakeLists.txt --- 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) + ########################## diff -r 5873c671490f -r 16428c4ecb22 tests/CMakeLists.txt --- a/tests/CMakeLists.txt Sun Oct 21 17:27:31 2012 +0200 +++ b/tests/CMakeLists.txt Sun Oct 21 17:41:02 2012 +0200 @@ -24,13 +24,20 @@ testpeers testdict testmesg - testfifo testsess testdisp testcnx testloadext ) +IF(HAVE_PTHREAD_BAR) +SET(TEST_LIST + ${TEST_LIST} + testfifo +) +ENDIF(HAVE_PTHREAD_BAR) + + ############################# # Some parameters for the tests