Skip to content

Commit

Permalink
build: Enable exceptions correctly on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Feb 1, 2025
1 parent 82ce312 commit 506b867
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ if (LIBPL_ENABLE_PRECOMPILED_HEADERS)
)
endif ()

if(MSVC)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_compile_options(libpl PRIVATE /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas -Wno-array-bounds)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(libpl PRIVATE -Wno-stringop-overflow)
endif()
endif()
Expand Down

0 comments on commit 506b867

Please sign in to comment.