Skip to content

Commit

Permalink
Fix: Only enable -Og fix for MINGW
Browse files Browse the repository at this point in the history
  • Loading branch information
spnda committed Jan 9, 2024
1 parent 5dbb1fc commit eb3073d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmake/compiler_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<$<CONFIG:RELEASE>:-O3>)

# Issue with MinGW: https://github.com/simdjson/simdjson/issues/1963
target_compile_options(${TARGET} PUBLIC $<$<CONFIG:DEBUG>:-Og>)
if (MINGW)
# Issue with MinGW: https://github.com/simdjson/simdjson/issues/1963
target_compile_options(${TARGET} PUBLIC $<$<CONFIG:DEBUG>:-Og>)
endif()

# https://github.com/simdjson/simdjson/blob/master/doc/basics.md#performance-tips
target_compile_options(${TARGET} PRIVATE $<$<CONFIG:RELEASE>:-DNDEBUG>)
Expand Down

0 comments on commit eb3073d

Please sign in to comment.