mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
Fix msvc compiler warnings (#374)
To be noticed I edited thirdparty header for fmt library (#373), idk if it is acceptable
This commit is contained in:
@@ -80,6 +80,25 @@ if(MSVC)
|
||||
|
||||
# enable COMDAT folding for even smaller release builds
|
||||
add_link_options("$<$<CONFIG:RELEASE,MINSIZEREL>:/OPT:ICF>")
|
||||
|
||||
# always use UTF-8 (fix 4819)
|
||||
add_compile_options("/utf-8")
|
||||
|
||||
# spectre mitigation warning
|
||||
add_compile_options("/wd5045")
|
||||
|
||||
# implicit type convert warnings
|
||||
add_compile_options("/wd4244")
|
||||
add_compile_options("/wd4267")
|
||||
add_compile_options("/wd4305")
|
||||
|
||||
# unreferenced local variable
|
||||
add_compile_options("/wd4101")
|
||||
|
||||
# warning in winbase.h??
|
||||
add_compile_options("/wd5039")
|
||||
|
||||
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
# disable warnings about using non _s variants like strncpy
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
Reference in New Issue
Block a user