Skip to content

Commit

Permalink
Merge pull request #364 from qw-ctf/win-warn
Browse files Browse the repository at this point in the history
WIN: Disable some opinionated msvc warnings.
  • Loading branch information
dsvensson committed Sep 1, 2024
2 parents ea92a73 + ff005e2 commit 4c73b57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ if(FTESV)
endif()
# If not Miscrosoft compilator - then set additional options for linker.
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
# 4100 - unused parameter
# 4210 - using extern keyword in functions
# 4456 - shadowing locals, broadly used
# 4459 - shadowing globals, broadly used
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /wd4100 /wd4210 /wd4456 /wd4459)
else()
target_compile_options(${PROJECT_NAME} PRIVATE -Wall)

Expand Down

0 comments on commit 4c73b57

Please sign in to comment.