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()
if ("$ENV{CXXFLAGS}" MATCHES "(^| )(-O(fast|.?))( |$)")
add_cxx_compile_options(${CMAKE_MATCH_0})
else ()
add_cxx_compile_options(-Og)
endif()
else()
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()