OpenSceneGraph/CMakeModules
Robert Osfield d703c58936 From Blasius Czink, "Among other things I added support for atomic operations on BSD-like systems and additional methods (for "and", "or", "xor").
"

and a later post the same osg-submissions thread:

"it's been a while since I have made the changes but I think it was due to problems with static builds of OpenThreads on windows. I was using
OpenThreads in a communication/synchronisation library (without
OpenSceneGraph). It seems I forgot to post a small change in the CMakeLists file of OpenThreads. If a user turns DYNAMIC_OPENTHREADS to OFF (static build) OT_LIBRARY_STATIC will be defined in the Config.
Without these changes a windows user will always end up with a "__declspec(dllexport)" or "__declspec(dllimport)" which is a problem for static builds."

And another post from Blasius on this topic:

"I tested with VS2005 and VS2008. For 32 bit everything works as expected. For x64 and VS2008 I could successfully do the cmake-configure and then the compilation but I had occasional crashes of cmTryCompileExec.exe (during the cmake-configure phase) which seems to be a cmake bug. With VS2005 and 64bit cmake does not set _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED although the interlocked functionality should be there. If I place the source snippet from the CHECK_CXX_SOURCE_RUNS macro to a separate sourcefile I can compile and run the resulting executable successfully. Forcing OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED (on VS2005/x64) reveals a bug in "intrin.h" which seems to be fixed in VS2008 but not in VS2005.

In case anyone is interested the lines:
__MACHINEI(unsigned char _interlockedbittestandset(long *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long *a, long b))
__MACHINEX64(unsigned char _interlockedbittestandset64(__int64 *a, __int64 b))
__MACHINEX64(unsigned char _interlockedbittestandreset64(__int64 *a, __int64 b))

should be changed to:
__MACHINEI(unsigned char _interlockedbittestandset(long volatile *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long volatile *a, long b))
__MACHINEX64(unsigned char _interlockedbittestandset64(__int64 volatile *a, __int64 b))
__MACHINEX64(unsigned char _interlockedbittestandreset64(__int64 volatile *a, __int64 b))

The worst thing that can happen is that interlocked funtionality is not detected during cmake-configure and the mutex fallback is used.
Which reminds me another small glitch in the Atomic header so I attached a corrected version.



    Why is the OT_LIBRARY_STATIC added to the config file? It is not needed anywhere.

OT_LIBRARY_STATIC is needed if you are doing static-builds on Windows. See my previous post on that.
"
2008-10-27 10:42:58 +00:00
..
CheckAtomicOps.cmake From Blasius Czink, "Among other things I added support for atomic operations on BSD-like systems and additional methods (for "and", "or", "xor"). 2008-10-27 10:42:58 +00:00
clean_directories Added utilty script for cleaning up build files/directories. 2008-03-14 15:33:47 +00:00
cmake_uninstall.cmake.in From David Callu, "I have added the uninstall command at the end of the first file, 2007-05-17 11:48:30 +00:00
Find3rdPartyDependencies.cmake From Philip Lowman, post 1: 2008-05-26 22:36:58 +00:00
FindCOLLADA.cmake From Garrett Potts and Robert Osfield, changes to build against Collada DOM 2.x 2008-05-08 12:36:07 +00:00
FindFLTK.cmake Added local FindFLTK.cmake to avoid problems with FLTK no being found by standard 2007-06-04 13:45:58 +00:00
FindFOX.cmake From Alexandre Amalric, Fox example 2007-07-24 14:02:53 +00:00
FindFreeType.cmake From Colin McDonald, build fixes for Solaris. 2008-01-08 18:13:06 +00:00
FindGDAL.cmake From Jose Delport, added support for finding and using GDAL 1.5 2008-03-11 13:19:08 +00:00
FindGIFLIB.cmake From Eric Wing, "Attached are a few Find modules with updates. Among other things, they 2008-01-04 20:00:18 +00:00
FindInventor.cmake Fixed debug build of Inventor plugin 2008-01-21 17:04:33 +00:00
FindJasper.cmake Added support for jp2 plugin 2007-05-04 13:20:48 +00:00
FindOpenThreads.cmake From Eric Wing, "Attached are a few Find modules with updates. Among other things, they 2008-01-04 20:00:18 +00:00
FindOpenVRML.cmake From Jean-Sebastien Guay, "Attached you will find an expanded FindOpenVRML.cmake file, as well as a fixed CMakeLists.txt file for the VRML plugin ." 2007-09-26 14:44:22 +00:00
FindOSG.cmake Added missing cmake macros 2007-06-26 17:12:48 +00:00
FindOurDCMTK.cmake Added support for finding DCMTK-3.5.4 installed lib/include placement 2008-09-17 11:43:14 +00:00
FindPerformer.cmake From Guillaume Millet, "Please find in attachment a small improvement to the pfb plugin 2007-09-07 10:15:39 +00:00
FindQuickTime.cmake From Eric Wing, "Attached are a few Find modules with updates. Among other things, they 2008-01-04 20:00:18 +00:00
FindXine.cmake Added first cut a Xine support 2007-05-04 19:17:49 +00:00
FindZLIB.cmake From Ulrich Hertlein, "on my MacOS X/cmake setup the zlib plugin isn't built by default. This may be because zlib.h is 2007-06-06 15:22:31 +00:00
ListHandle.cmake Fixed tabbing 2007-04-27 09:49:28 +00:00
ModuleInstall.cmake From Luigi Calori, introduction of versioning of dll's and placement of dll and plugins into bin directory during build. 2007-08-30 10:41:15 +00:00
OsgMacroUtils.cmake From Mathieu Marache, "I came across a bug when building OpenSceneGraph with 2008-10-27 09:48:34 +00:00
UtilityMacros.cmake Fixed tabbing 2007-04-27 09:49:28 +00:00