Commit Graph

75 Commits

Author SHA1 Message Date
Robert Osfield
734463fcc7 Warning fixes 2009-02-03 15:28:53 +00:00
Robert Osfield
33d158e290 Updated OpenThreads and OpenSceneGraph version ready for OSG-2.8 branch. 2009-02-02 14:55:51 +00:00
Robert Osfield
c898bc0ce7 From Alberto Luaces, "I have modified CMakeLists.txt in order to make CMake fill the existent
openscenegraph.pc and openthreads.pc files with OSG's installation values.
Then I install those files into the expected path for pkg-config (this can
also be modified through PKG_CONFIG_PATH environment variable). Therefore
those of us who are using pkg-config for linking can easily select which
version of OSG we want to use."
2009-01-27 15:34:57 +00:00
Robert Osfield
b36f7e1fe7 From Mattias Froehlich, "To pass the Microsoft application verifier we have tried to get osgviewer
working with that thing.
This is what was missing so far:

Make win32 threads behave like the posix implementation when setting thread
cpu affinity. That includes avoid setting thread affininty on a non running
thread. Set that once it is running."
2009-01-23 10:29:09 +00:00
Robert Osfield
418dc34776 Fixed warnings 2009-01-07 11:24:47 +00:00
Robert Osfield
bd4b6e9b8c Updated version numbers for 2.8.8 dev release 2008-12-16 16:36:33 +00:00
Robert Osfield
f8ada4953d From Mathias Froehilch, "
On OpenThreads win32 implementation we unconditionally unlock a mutex in the
destructor. That happens even if the mutex was not locked before.
When running a osg application within microsofts application verifier, that
software checks tells me that we should not unlock an unlocked mutex.

When I look at the posix threads mutex implementation, which does no unlock in
the destructor and where it is illegal to destroy a locked mutex, I conclude
that it is not needed for an OpenThreads::Mutex to do that unlock in the
win32 Mutex destructor.

Thus this patch based on rev 9358 removes that additional unlock in the win32
mutex implementations destructor."
2008-12-16 15:21:17 +00:00
Robert Osfield
c7b6dd9a18 From Mattias Helsing,"Added doc/Doxyfiles/openthreads.doxyfile.cmake
Updated all doxyfiles under doc/Doxyfiles. They are now all processed
by cmake but make targets are only generated for
OpenSceneGraphReferenceDocs and OpenThreadsReferenceDocs. The others
can be run with doxygen directly in <builddir>/doc.
Fixed a copy-paste in openthreads sproc and pthreads CMakeLists
Added the osg logo to the html footers
Added possibility to get generation of chm files.

CMakeLists (toplevel):
Added install of osg and ot reference docs. This also generates
packaging targets of openscenegraph-doc and openthreads-doc if you
have packaging enabled
Removed the unused USING_OP_OT_TRIPLE_SET since there was no way of
enabling it anyway
Removed BUILD_REF_DOCS. IMO it was redundant - BUILD_DOCUMENTATION
does the same thing and we get that anyway from including
Documentation.cmake.
OsgCPack.cmake:
Removed generation of PACKAGE_SRC for msvc
Added special handling for -doc packaging targets - they don't require
system, architecture or compiler"
2008-12-16 11:43:28 +00:00
Robert Osfield
55fe4967ad From Mattias Helsing, "I have developed the earlier cpack example a bit. Perhaps you could
consider these initial cpack support scripts. It is hidden behind a
BUILD_PACKAGES option so won't affect the normal user. The submission
1) set the COMPONENT attribute on all cmake install commands.
COMPONENT names are according to
http://www.openscenegraph.org/projects/osg/wiki/Community/Packaging

2) provide cmake script and a template for creating CPack
configuration files. It will generate target for creating packages
with everything that gets "installed" (make package on unx, project
PACKAGE in MSVC) plus targets for generating one package per COMPONENT
(i.e. libopenscenegraph-core etc.).

I have temporariliy uploaded some examples to
http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHelsing

If this submission makes it into svn we can develop it to generate
rpms, installers for windows and mac (I know at least J-S don't like
these but there may be others who do ;) and even DEBs (not sure if we
can make them "ubuntu-ready" but they eventually may - at least we
could put a deb on the website)"
2008-12-12 11:01:09 +00:00
Robert Osfield
484ead14b5 Added Thread::Init() to CurrentThread 2008-11-05 10:27:49 +00:00
Robert Osfield
3d07ab5664 Warning fixes 2008-10-29 11:15:33 +00:00
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
Robert Osfield
f81ff952a2 merged 2.6 branch changes back into trunk using : svn merge -r 8699:8706 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-2.6 . 2008-08-03 16:57:09 +00:00
Robert Osfield
53636db5bc From Mathias Froehlich, updated CMakeLists.txt to build the Atomic.cpp 2008-06-26 15:06:44 +00:00
Robert Osfield
c32ee85d3d From Mathias Froehlich, added do not edit comments to Config.in so that the autogenerated
Config files have an appropriate warning notice
2008-06-26 10:33:47 +00:00
Robert Osfield
5a4ce5a387 From Mathias Froechlich, "Attached is a change to that atomic stuff to move the win32, msvc
implementation of the atomic increment and decrement into a implementation
file.
This way inlining and compiler optimization can no longer happen for these
implementations, but it fixes compilation on win32 msvc targets. I expect
that this is still faster than with with mutexes.

Also the i386 gcc target gets atomic operations with this patch. By using an
implementation file we can guarantee that we have the right compiler flags
available."
2008-06-26 10:27:16 +00:00
Robert Osfield
87b74c1f54 Commented out the explict install of the Config files as including these files into
the header list allows the normal Cmake install support to install them.
2008-06-23 10:18:04 +00:00
Robert Osfield
415d45525c Changed the include/osg/Config and include/OpenThreads/Config references to use the assocaited CMake variable for these headers 2008-06-20 19:52:14 +00:00
Robert Osfield
bc6e5b5da2 Updated version numbers for dev releases 2008-06-20 11:11:47 +00:00
Robert Osfield
d7e9e5e495 From Mathias Froehlich, OpenThreads::Atomic support 2008-06-17 17:43:59 +00:00
Robert Osfield
476cb5373e From Philip Lowman, post 1:
"Here is a collection of changes which should fix issues building the OSG with CMake 2.6.0 (along with some other changes)

CMakeLists.txt:
* Set CMP0003 to supress warning about linking against -lpthread (which is a
  non-absolute library location).  (CMake 2.6.x fix)
* Modified the WIN32_USE_MP and a couple of other Visual Studio specific flags
  to be in an IF(MSVC) block  (minor tweak to reduce exposing this stuff on MinGW builds)
* Includes my second set of glu tesselator autodetection changes that you
seemed to want but haven't committed yet.

src/OpenThreads/pthreads/CMakeLists.txt:
* Eliminates warning when compiling on Linux about spaces in link line (CMake 2.6.x fix)

CMakeModules/OsgMacroUtils.cmake:
* Tweaks to make the macros behave properly under CMake 2.6.0 (doesn't change behavior under CMake 2.4.x)

CMakeModules/Find3rdPartyDependencies.cmake:
* Adds the NO_DEFAULT_PATH option to all of the search options so that things in C:\Program Files\OpenSceneGraph aren't accidently picked up during configure time and instead only things in the "3rdParty" folder are discovered. (general bugfix)
"

post 2:
"Ok, hold the presses.  I just discovered that for some odd reason the osgdb_* plugins under Linux aren't getting put under the osgPlugins-2.5.0 folder.  Not exactly sure why this broke, the folder was there, just empty.  I'll have to look into it this evening."

post 3:

"Fixed, was caused by the switch to CMAKE_LIBRARY_OUTPUT_DIRECTORY and some code in osgPlugins/CMakeLists.txt that effectively overrides LIBRARY_OUTPUT_PATH on non-MSVC compilers to dump the plugins in the plugins folder.  I tweaked it to override CMAKE_LIBRARY_OUTPUT_DIRECTORY as well.  Seems to work fine."
2008-05-26 22:36:58 +00:00
Robert Osfield
78964b4baa Reverted the changes for ill fated tweaks for Apple build 2008-04-24 11:34:43 +00:00
Robert Osfield
8ae30c9bfc Refactored the inclusion of the headers in the ADD_LIBRARY so that they aren't
added under OSX.
2008-04-23 20:50:53 +00:00
Robert Osfield
aac06fd437 Updated OpenThreads version to 2.2.1 with the switch of sources/svn:externals from OpenThreads to OpenSceneGraph. 2008-04-01 11:03:45 +00:00
Robert Osfield
323ce02f23 Moved OpenThreads directly into OpenSceneGraph/trunk rather than being introduced via svn:externals.
This change has been done to make it easier for OpenSceneGraph users to check out the svn via https 
without any conflicts introduced with a http externals.
2008-04-01 10:49:53 +00:00