1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 01:29:43 +01:00

Fix wrong comment on disabling MSVC exceptions

`/EHsc` does not actually disable exceptions on MSVC, it only makes the
compiler assume that `extern "C"` functions never throw C++ exceptions.

We had a discussion on Discord about actually disabling exceptions, and
from research, that requires defining `_HAS_EXCEPTIONS=0`, but it's
unsupported and undocumented so we deemed the benefits not worth it.
Thus, we will stay with `/EHsc`. But the comment still has to be
updated.

[skip ci]
This commit is contained in:
Misa 2024-06-27 17:24:36 -07:00 committed by Misa Elizabeth Kai
parent 6df7d5df8a
commit a990f8d87d

View file

@ -287,7 +287,8 @@ endif()
if(MSVC) if(MSVC)
# MSVC doesn't have /std:c99 or /std:c++98 switches! # MSVC doesn't have /std:c99 or /std:c++98 switches!
# Disable exceptions # MSVC does not officially support disabling exceptions,
# so this is as far as we are willing to go to disable them.
string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")