Remove warnings

This commit is contained in:
Zhi Guan
2022-10-13 16:16:42 +08:00
parent c39889b7d0
commit dbc5b316b5
13 changed files with 44 additions and 78 deletions

View File

@@ -90,6 +90,8 @@ set(broken_crypto_src
src/rc4.c
)
# FIXME: change this default to OFF
option(ENABLE_BROKEN_CRYPTO "Enable broken crypto algorithms" ON)
@@ -116,6 +118,8 @@ else()
target_link_libraries(gmssl dl)
endif()
SET_TARGET_PROPERTIES(gmssl PROPERTIES VERSION 3.0 SOVERSION 3)
set(tools
@@ -238,3 +242,9 @@ if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
INSTALL(TARGETS gmssl-bin RUNTIME DESTINATION bin)
endif()
if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
target_compile_options(gmssl PRIVATE /wd4996)
target_compile_options(gmssl-bin PRIVATE /wd4996)
# target_compile_options(gmssl PRIVATE /wd4996)
endif()