Merge branch 'gltf2-exporter-crash' of https://github.com/JLouis-B/assimp into gltf2-exporter-crash

pull/3531/head
Jean-Louis Boudrand 2020-12-13 17:03:09 +01:00
commit 922f874e78
11 changed files with 58 additions and 22 deletions

View File

@ -249,9 +249,15 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON) SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
ENDIF() ENDIF()
# hide all not-exported symbols # hide all not-exported symbols
SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}") IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64" )
SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}") SET(CMAKE_CXX_FLAGS "-mxgot -fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}")
SET(LIBSTDC++_LIBRARIES -lstdc++) SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
SET(LIBSTDC++_LIBRARIES -lstdc++)
ELSE()
SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
SET(LIBSTDC++_LIBRARIES -lstdc++)
ENDIF()
ELSEIF(MSVC) ELSEIF(MSVC)
# enable multi-core compilation with MSVC # enable multi-core compilation with MSVC
IF( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) # clang-cl IF( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) # clang-cl

View File

@ -9,8 +9,10 @@ For details, see http://sourceforge.net/projects/libb64
const int CHARS_PER_LINE = 72; const int CHARS_PER_LINE = 72;
#ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4244) #pragma warning(disable : 4244)
#endif // _MSC_VER
void base64_init_encodestate(base64_encodestate* state_in) void base64_init_encodestate(base64_encodestate* state_in)
{ {
@ -110,4 +112,6 @@ int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
return (int)(codechar - code_out); return (int)(codechar - code_out);
} }
#ifdef _MSC_VER
#pragma warning(pop) #pragma warning(pop)
#endif // _MSC_VER

View File

@ -27,10 +27,10 @@ THE SOFTWARE.
#include "o3dgcArithmeticCodec.h" #include "o3dgcArithmeticCodec.h"
#include "o3dgcTimer.h" #include "o3dgcTimer.h"
#ifdef _WIN32 #ifdef _MSC_VER
# pragma warning(push) # pragma warning(push)
# pragma warning( disable : 4456) # pragma warning( disable : 4456)
#endif // _WIN32 #endif // _MSC_VER
//#define DEBUG_VERBOSE //#define DEBUG_VERBOSE
@ -852,9 +852,9 @@ namespace o3dgc
} }
} // namespace o3dgc } // namespace o3dgc
#ifdef _WIN32 #ifdef _MSC_VER
# pragma warning( pop ) # pragma warning( pop )
#endif // _WIN32 #endif // _MSC_VER
#endif // O3DGC_SC3DMC_DECODER_INL #endif // O3DGC_SC3DMC_DECODER_INL

View File

@ -32,10 +32,10 @@ THE SOFTWARE.
//#define DEBUG_VERBOSE //#define DEBUG_VERBOSE
#ifdef _WIN32 #ifdef _MSC_VER
# pragma warning(push) # pragma warning(push)
# pragma warning(disable : 4456) # pragma warning(disable : 4456)
#endif // _WIN32 #endif // _MSC_VER
namespace o3dgc namespace o3dgc
{ {
@ -927,9 +927,9 @@ namespace o3dgc
} }
} // namespace o3dgc } // namespace o3dgc
#ifdef _WIN32 #ifdef _MSC_VER
# pragma warning(pop) # pragma warning(pop)
#endif // _WIN32 #endif // _MSC_VER
#endif // O3DGC_SC3DMC_ENCODER_INL #endif // O3DGC_SC3DMC_ENCODER_INL

View File

@ -28,7 +28,9 @@ THE SOFTWARE.
#ifdef _WIN32 #ifdef _WIN32
/* Thank you, Microsoft, for file WinDef.h with min/max redefinition. */ /* Thank you, Microsoft, for file WinDef.h with min/max redefinition. */
#ifndef NOMINMAX
#define NOMINMAX #define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#elif __APPLE__ #elif __APPLE__
#include <mach/clock.h> #include <mach/clock.h>

View File

@ -18,8 +18,10 @@
/* Win32, DOS, MSVC, MSVS */ /* Win32, DOS, MSVC, MSVS */
#include <direct.h> #include <direct.h>
#ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4706) #pragma warning(disable : 4706)
#endif // _MSC_VER
#define MKDIR(DIRNAME) _mkdir(DIRNAME) #define MKDIR(DIRNAME) _mkdir(DIRNAME)
#define STRCLONE(STR) ((STR) ? _strdup(STR) : NULL) #define STRCLONE(STR) ((STR) ? _strdup(STR) : NULL)
@ -968,4 +970,6 @@ out:
return status; return status;
} }
#ifdef _MSC_VER
#pragma warning(pop) #pragma warning(pop)
#endif // _MSC_VER

View File

@ -52,9 +52,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma GCC system_header #pragma GCC system_header
#endif #endif
#ifdef _WIN32 #ifdef _MSC_VER
#pragma warning(disable : 4351) #pragma warning(disable : 4351)
#endif // _WIN32 #endif // _MSC_VER
#include <assimp/aabb.h> #include <assimp/aabb.h>
#include <assimp/types.h> #include <assimp/types.h>

View File

@ -31,10 +31,16 @@
#include <dxgiformat.h> #include <dxgiformat.h>
#include <assert.h> #include <assert.h>
#ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4005) #pragma warning(disable : 4005)
#endif // _MSC_VER
#include <wincodec.h> #include <wincodec.h>
#ifdef _MSC_VER
#pragma warning(pop) #pragma warning(pop)
#endif // _MSC_VER
#include <memory> #include <memory>

View File

@ -31,10 +31,16 @@
#include <d3d11.h> #include <d3d11.h>
#ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4005) #pragma warning(disable : 4005)
#endif // _MSC_VER
#include <stdint.h> #include <stdint.h>
#ifdef _MSC_VER
#pragma warning(pop) #pragma warning(pop)
#endif // _MSC_VER
HRESULT CreateWICTextureFromMemory(_In_ ID3D11Device* d3dDevice, HRESULT CreateWICTextureFromMemory(_In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext, _In_opt_ ID3D11DeviceContext* d3dContext,

View File

@ -25,10 +25,12 @@
#include "UTFConverter.h" #include "UTFConverter.h"
#include "SafeRelease.hpp" #include "SafeRelease.hpp"
#ifdef _MSC_VER
#pragma comment (lib, "d3d11.lib") #pragma comment (lib, "d3d11.lib")
#pragma comment (lib, "Dxgi.lib") #pragma comment (lib, "Dxgi.lib")
#pragma comment(lib,"d3dcompiler.lib") #pragma comment(lib,"d3dcompiler.lib")
#pragma comment (lib, "dxguid.lib") #pragma comment (lib, "dxguid.lib")
#endif // _MSC_VER
using namespace DirectX; using namespace DirectX;
using namespace AssimpSamples::SharedCode; using namespace AssimpSamples::SharedCode;

View File

@ -18,10 +18,16 @@
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glu.h> #include <GL/glu.h>
#ifdef _MSC_VER
#pragma warning(disable: 4100) // Disable warning 'unreferenced formal parameter' #pragma warning(disable: 4100) // Disable warning 'unreferenced formal parameter'
#endif // _MSC_VER
#define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION
#include "contrib/stb_image/stb_image.h" #include "contrib/stb_image/stb_image.h"
#ifdef _MSC_VER
#pragma warning(default: 4100) // Enable warning 'unreferenced formal parameter' #pragma warning(default: 4100) // Enable warning 'unreferenced formal parameter'
#endif // _MSC_VER
#include <fstream> #include <fstream>