Pass _CRT_SECURE_NO_WARNINGS on MSVC

This commit is contained in:
Eidolon 2023-12-14 23:27:44 -06:00
parent 22809e928b
commit 0ca9fca869

View file

@ -417,6 +417,11 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
endif()
# Yes we know we use insecure CRT functions...
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_compile_definitions(SRB2SDL2 PRIVATE -D_CRT_SECURE_NO_WARNINGS)
endif()
# Compiler warnings configuration
target_compile_options(SRB2SDL2 PRIVATE
# Using generator expressions to handle per-language compile options