This commit is contained in:
sideshowbarker 2024-11-21 15:42:52 +09:00 committed by GitHub
commit fb6e249b08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,9 +29,17 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
if (NOT MSVC)
add_cxx_compile_options(-ggdb3)
endif()
add_cxx_compile_options(-Og)
if ("$ENV{CXXFLAGS}" MATCHES "(^| )(-O(fast|.?))( |$)")
add_cxx_compile_options(${CMAKE_MATCH_0})
else ()
add_cxx_compile_options(-Og)
endif()
else()
add_cxx_compile_options(-O2)
if ("$ENV{CXXFLAGS}" MATCHES "(^| )(-O(fast|.?))( |$)")
add_cxx_compile_options(${CMAKE_MATCH_0})
else ()
add_cxx_compile_options(-O2)
endif()
if (NOT MSVC)
add_cxx_compile_options(-g1)
endif()