From: Pedro Lopez-C. <ped...@gm...> - 2007-07-18 20:24:41
|
On Wednesday, 18 July 2007 09:57, Daniel O'Connor wrote: > On Tuesday 17 July 2007 23:10, Chris Cannam wrote: > > On Monday 16 July 2007 08:37, Daniel O'Connor wrote: > > > I have build RoseGarden out of SVN on FreeBSD but I needed to apply > > > the attached diff. (The ifdef appears to be the result of a > > > mis-merge IMO) > > > > The #ifdef is intentional. The cause of your problem is that we used > > to have a configure check for the existence of > > PTHREAD_MUTEX_RECURSIVE, which would cause > > HAVE_PTHREAD_MUTEX_RECURSIVE to be defined on platforms such as > > FreeBSD, and this check doesn't seem to have made it across to our > > newer CMake build system. Sorry, my bad. The test was in the autotools based buildsystem, but omitted= in=20 the scons and cmake based ones. > Ah I see.. I misread the #ifdefs.. > > Any idea how to fix it? I have been forcably subjected to auto* and know > how to mangle that a little but cmake is new to me :( I've added just now a new test to SVN trunk, but I've tested it only on Lin= ux.=20 Please tell us if it works in FreeBSD too. This is the new test in CMakeLists.txt: +# Check PTHREAD_MUTEX_RECURSIVE +INCLUDE(CheckCSourceCompiles) +CHECK_C_SOURCE_COMPILES( + =A0 =A0"#include <pthread.h> + =A0 =A0 int main(int argc, char **argv) { + =A0 =A0 =A0 =A0 pthread_mutexattr_t attr; + =A0 =A0 =A0 =A0 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + =A0 =A0 =A0 =A0 return 0; + =A0 =A0 }" PTHREAD_HAS_MUTEX_RECURSIVE) +IF(PTHREAD_HAS_MUTEX_RECURSIVE) + =A0 =A0ADD_DEFINITIONS(-DHAVE_PTHREAD_MUTEX_RECURSIVE) +ENDIF(PTHREAD_HAS_MUTEX_RECURSIVE) +# End of PTHREAD_MUTEX_RECURSIVE Test Regards, Pedro |