Skip to content

Commit

Permalink
Updated CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Feb 22, 2024
1 parent ff0746f commit e8e9294
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmake/ncine_helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ function(ncine_apply_compiler_options target)
# Exceptions
if(ARGS_ALLOW_EXCEPTIONS)
target_compile_options(${target} PRIVATE "/EHsc")
#if((MSVC_VERSION GREATER_EQUAL 1929) AND NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
# # Use the undocumented compiler flag to make our binary smaller on x64
# # https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/
# target_compile_options(${target} PRIVATE "/d2FH4")
#endif()
if((MSVC_VERSION GREATER_EQUAL 1929) AND NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
# Use the undocumented compiler flag to make our binary smaller on x64
# https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/
target_compile_options(${target} PRIVATE "/d2FH4")
endif()
else()
target_compile_options(${target} PRIVATE "/EHs-c-" "/wd4530" "/wd4577")
#target_compile_options(${target} PRIVATE "/EHs-c-" "/wd4530" "/wd4577")
target_compile_definitions(${target} PRIVATE "_HAS_EXCEPTIONS=0")
endif()

Expand Down

0 comments on commit e8e9294

Please sign in to comment.