From eb3073df77bf31e4e979d9a5cb1818eaa3924ea6 Mon Sep 17 00:00:00 2001 From: sean Date: Tue, 9 Jan 2024 12:50:19 +0100 Subject: [PATCH] Fix: Only enable -Og fix for MINGW --- cmake/compiler_flags.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/compiler_flags.cmake b/cmake/compiler_flags.cmake index bde986920..ddb5d0227 100644 --- a/cmake/compiler_flags.cmake +++ b/cmake/compiler_flags.cmake @@ -11,8 +11,10 @@ macro(fastgltf_compiler_flags TARGET) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") target_compile_options(${TARGET} PRIVATE $<$:-O3>) - # Issue with MinGW: https://github.com/simdjson/simdjson/issues/1963 - target_compile_options(${TARGET} PUBLIC $<$:-Og>) + if (MINGW) + # Issue with MinGW: https://github.com/simdjson/simdjson/issues/1963 + target_compile_options(${TARGET} PUBLIC $<$:-Og>) + endif() # https://github.com/simdjson/simdjson/blob/master/doc/basics.md#performance-tips target_compile_options(${TARGET} PRIVATE $<$:-DNDEBUG>)