Skip to content

Commit

Permalink
Re-enabled warings (lost by accident when the cmake migration was done)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Wilmans committed Jun 20, 2024
1 parent 69f5ee5 commit 06f2a96
Show file tree
Hide file tree
Showing 12 changed files with 1,427 additions and 1,408 deletions.
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,26 @@ add_library(msvc_console_link_options INTERFACE)
target_compile_features(project_compile_features INTERFACE cxx_constexpr cxx_auto_type cxx_final cxx_std_20)
target_compile_definitions(project_definitions
INTERFACE
UNICODE _CRT_SECURE_NO_WARNINGS NOMINMAX WIN32_LEAN_AND_MEAN
WIN32 WIN64 "_WIN32_WINNT=0x0601"
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
)
UNICODE
NOMINMAX
WIN32_LEAN_AND_MEAN
_CRT_SECURE_NO_WARNINGS
_WINSOCK_DEPRECATED_NO_WARNINGS
WIN32
WIN64
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
"_WIN32_WINNT=0x0601"
)
# "_ITERATOR_DEBUG_LEVEL=0" # trips over debug/release mismatches

# /Oy and /RELEASE are added to avoid tripping malware detection
# this is quite random, ymmv
target_compile_options(project_compile_options INTERFACE /utf-8 /Oy)
target_link_options(msvc_gui_link_options INTERFACE /SUBSYSTEM:WINDOWS /NOLOGO /RELEASE)
target_link_options(msvc_console_link_options INTERFACE /SUBSYSTEM:CONSOLE /NOLOGO /RELEASE)

# warnings (the project picked up a bunch of unresolved warnings with migrating to new VS versions and when {fmt} was added, work in progress...)
target_compile_options(project_compile_options INTERFACE /W4 /w14242 /w14254 /w14263 /w14265 /w14287 /w14289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549 /w14555 /w14640 /w14826 /w14905 /w14906 /w14928)

add_library(project::definitions ALIAS project_definitions)
add_library(project::compile_features ALIAS project_compile_features)
Expand Down
Loading

0 comments on commit 06f2a96

Please sign in to comment.