chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.38k stars 467 forks source link

cmake: Only define _HAS_EXCEPTIONS=0 for MSVC builds #3787

Open siren186 opened 2 months ago

siren186 commented 2 months ago

https://github.com/chromiumembedded/cef/blob/8c6f8dd404394cc36b6f1d1aff3dd593054d1b0c/cmake/cef_variables.cmake.in#L502

This switch _HAS_EXCEPTIONS=0 will not disalbe exceptions, on the contrary, it brings some problems. See: https://github.com/pocoproject/poco/issues/4668 https://github.com/nodejs/node-addon-api/issues/85

siren186 commented 2 months ago

See alse: https://github.com/Tencent/wcdb/commit/077c061f91f46c14164c1fe2774b65ad2a55c49b

magreenblatt commented 1 month ago

Chromium defines this value for MSVC builds (see here), and we need to match the Chromium configuration. If you think this is incorrect you can raise an issue with Chromium at https://crbug.com.

magreenblatt commented 1 month ago

More specifically, we could modify the CMake config to only define _HAS_EXCEPTIONS=0 when building with MSVC. However, MSVC is the only compiler that we currently support for building the CEF binary distribution on Windows.