From Björn Blissing, fix for ambiguous defines in Atomic.cpp when compiling with MinGW and GCC

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14513 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2014-11-21 10:21:46 +00:00
parent 5da4e80e95
commit 2986df22d6

View File

@ -143,6 +143,15 @@ ELSE()
NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC) NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1) SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
ENDIF() ENDIF()
# MinGW can set both WIN32_INTERLOCKED and GCC_BUILTINS to true which results in compliation errors
IF (_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
# In this case we prefer the GCC_BUILTINS
SET(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS 1)
SET(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED 0)
ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()