From 8041251ac41fe3baff38789c2ff71c96cfe575aa Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Tue, 28 Nov 2023 02:18:19 +0900 Subject: [PATCH] bigobj flag to mingw-gcc build(not enabled by default) --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfa63cb55..fbbb94882 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -657,6 +657,11 @@ set_target_properties(tinyusdz_object PROPERTIES POSITION_INDEPENDENT_CODE ON) # Uncommend if you encounter the following errror: fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj #if(MSVC) # target_compile_options(tinyusdz_object PRIVATE /bigobj) +#elif(WIN32) +# if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") +# # guess mingw-gcc +# target_compile_options(tinyusdz_object PRIVATE "-Wa, -mbig-obj") +# endif() #endif() if (MSVC)