Ignore some warninngs on Windows.

This commit is contained in:
Christian Paquin 2020-03-17 10:59:31 -04:00
parent 7c083329f3
commit ee9680eaac
4 changed files with 15 additions and 0 deletions

View File

@ -18,6 +18,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
# the "{0}" structure initializer is used. # the "{0}" structure initializer is used.
add_compile_options(-Wno-missing-braces) add_compile_options(-Wno-missing-braces)
endif() endif()
if(WIN32)
add_compile_options(/wd4133)
endif()
set(SRCS kem_sike.c set(SRCS kem_sike.c
P434/P434.c P434/P434.c

View File

@ -9,6 +9,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-error) add_compile_options(-Wno-error)
endif() endif()
endif() endif()
if(WIN32)
add_compile_options(/wd4244 /wd4267 /wd4334)
endif()
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND
OQS_USE_AVX2_INSTRUCTIONS AND OQS_USE_AVX2_INSTRUCTIONS AND

View File

@ -1,3 +1,5 @@
if(ARCH STREQUAL "x86") if(ARCH STREQUAL "x86")
set(CPP_DEFS _X86_) set(CPP_DEFS _X86_)
elseif(ARCH STREQUAL "x86_64") elseif(ARCH STREQUAL "x86_64")
@ -27,7 +29,11 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux"
else() else()
set(CPP_DEFS ${CPP_DEFS} portable) set(CPP_DEFS ${CPP_DEFS} portable)
endif() endif()
if(WIN32)
add_compile_options(/wd4244)
endif()
add_library(qtesla OBJECT ${SRCS}) add_library(qtesla OBJECT ${SRCS})
target_include_directories(qtesla PRIVATE external) target_include_directories(qtesla PRIVATE external)
target_compile_definitions(qtesla PRIVATE ${CPP_DEFS}) target_compile_definitions(qtesla PRIVATE ${CPP_DEFS})

View File

@ -12,6 +12,9 @@ if (MINGW OR MSYS OR CYGWIN)
add_compile_options(-Wno-unknown-pragmas) add_compile_options(-Wno-unknown-pragmas)
add_compile_options(-Wno-unused-parameter) add_compile_options(-Wno-unused-parameter)
endif() endif()
if(WIN32)
add_compile_options(/wd4244 /wd4996)
endif()
if(NOT WIN32) if(NOT WIN32)
set(LIBM m) set(LIBM m)