Update compiler warnings
This commit is contained in:
@@ -20,13 +20,14 @@ endfunction()
|
|||||||
|
|
||||||
function(SetWarningSettings TARGET)
|
function(SetWarningSettings TARGET)
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
target_compile_options(${TARGET} PRIVATE -Wall -Wno-unknown-pragmas)
|
target_compile_options(${TARGET} PRIVATE -Wall -Wno-unknown-pragmas -Werror=return-type)
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
target_compile_options(${TARGET} PRIVATE "/wd4068;")
|
target_compile_options(${TARGET} PRIVATE "/wd4068;")
|
||||||
set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS "/we4715")
|
set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS "/we4715")
|
||||||
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/ignore:4099")
|
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/ignore:4099")
|
||||||
|
target_compile_options(${TARGET} PRIVATE "/WX4715;")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
Reference in New Issue
Block a user