Make clang with msvc abi work.
parent
13ee2306c3
commit
a19e4e4112
|
@ -386,7 +386,14 @@ void BlenderTessellatorP2T::ReferencePoints( std::vector< Blender::PointP2T >& p
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& point ) const
|
||||
{
|
||||
#if defined __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Winvalid-offsetof"
|
||||
#endif // __clang__
|
||||
unsigned int pointOffset = offsetof( PointP2T, point2D );
|
||||
#if defined __clang__
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
PointP2T& pointStruct = *reinterpret_cast< PointP2T* >( reinterpret_cast< char* >( &point ) - pointOffset );
|
||||
if ( pointStruct.magic != static_cast<int>( BLEND_TESS_MAGIC ) )
|
||||
{
|
||||
|
@ -394,7 +401,6 @@ inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& poi
|
|||
}
|
||||
return pointStruct;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void BlenderTessellatorP2T::MakeFacesFromTriangles( std::vector< p2t::Triangle* >& triangles ) const
|
||||
{
|
||||
|
|
|
@ -1065,7 +1065,7 @@ endif()
|
|||
|
||||
ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT )
|
||||
|
||||
if ( MSVC )
|
||||
IF( MSVC OR "${CMAKE_CXX_SIMULATE_ID}" MATCHES "MSVC") # clang with MSVC ABI
|
||||
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
||||
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
||||
endif ()
|
||||
|
|
Loading…
Reference in New Issue