mirror of
https://github.com/recp/cglm.git
synced 2025-12-24 12:32:40 +00:00
build: try to remove RTC1 from CMake build
This commit is contained in:
@@ -22,8 +22,16 @@ if(CGLM_USE_C99)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-DNDEBUG -D_WINDOWS -D_USRDLL -DCGLM_EXPORTS -DCGLM_DLL)
|
||||
add_compile_options(/W3 /Ox /Gy /Oi /TC)
|
||||
add_definitions(-DNDEBUG -D_WINDOWS -D_USRDLL -DCGLM_EXPORTS -DCGLM_DLL)
|
||||
add_compile_options(/W3 /Ox /Gy /Oi /TC)
|
||||
|
||||
# Ref: https://skia.googlesource.com/third_party/sdl/+/refs/heads/master/CMakeLists.txt#225
|
||||
# Make sure /RTC1 is disabled, otherwise it will use functions from the CRT
|
||||
foreach(flag_var
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
string(REGEX REPLACE "/RTC(su|[1su])" "" ${flag_var} "${${flag_var}}")
|
||||
endforeach(flag_var)
|
||||
else()
|
||||
add_compile_options(-Wall -Werror -O3)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user