Skip to content

Commit

Permalink
chore: raise msvc warning level
Browse files Browse the repository at this point in the history
  • Loading branch information
ToruNiina committed Jul 5, 2024
1 parent d72493a commit b63668c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if(TOML11_PRECOMPILE)
# required options to use toml11 with MSVC
if(MSVC)
target_compile_options(toml11 PUBLIC "/utf-8")
target_compile_options(toml11 PRIVATE "/W3" "/WX")
target_compile_options(toml11 PRIVATE "/W4" "/WX")
if(MSVC_VERSION LESS 1910)
message(STATUS "MSVC < 1910. DEFINE_CONVERSION_NON_INTRUSIVE is disabled")
target_compile_definitions(toml11 PUBLIC -DTOML11_WITHOUT_DEFINE_NON_INTRUSIVE)
Expand Down
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if(BUILD_TESTING)
)
target_link_libraries(${TEST_NAME} PUBLIC toml11 toml11_test_utility)
if(MSVC)
target_compile_options(${TEST_NAME} PRIVATE /W3 /WX)
target_compile_options(${TEST_NAME} PRIVATE /W4 /WX)
else()
target_compile_options(${TEST_NAME} PRIVATE
$<$<BOOL:${TOML11_COMPILER_SUPPORTS_WALL}>: -Wall >
Expand Down Expand Up @@ -95,7 +95,7 @@ if(TOML11_BUILD_TOML_TESTS)
)
target_link_libraries(toml11_decoder PRIVATE toml11)
if(MSVC)
target_compile_options(${TEST_NAME} PRIVATE /W3 /WX)
target_compile_options(${TEST_NAME} PRIVATE /W4 /WX)
else()
target_compile_options(toml11_decoder PRIVATE
$<$<BOOL:${TOML11_COMPILER_SUPPORTS_WALL}>: -Wall >
Expand Down Expand Up @@ -127,7 +127,7 @@ if(TOML11_BUILD_TOML_TESTS)
target_compile_definitions(toml11_decoder_v1_1_0 PRIVATE -DTOML11_TO_JSON_USE_V1_1_0)
target_link_libraries(toml11_decoder_v1_1_0 PRIVATE toml11)
if(MSVC)
target_compile_options(${TEST_NAME} PRIVATE /W3 /WX)
target_compile_options(${TEST_NAME} PRIVATE /W4 /WX)
else()
target_compile_options(toml11_decoder_v1_1_0 PRIVATE
$<$<BOOL:${COMPILER_SUPPORTS_WALL}>: -Wall >
Expand Down Expand Up @@ -158,7 +158,7 @@ if(TOML11_BUILD_TOML_TESTS)
)
target_link_libraries(toml11_encoder PRIVATE toml11)
if(MSVC)
target_compile_options(${TEST_NAME} PRIVATE /W3 /WX)
target_compile_options(${TEST_NAME} PRIVATE /W4 /WX)
else()
target_compile_options(toml11_encoder PRIVATE
$<$<BOOL:${TOML11_COMPILER_SUPPORTS_WALL}>: -Wall >
Expand Down

0 comments on commit b63668c

Please sign in to comment.