1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-04-28 19:43:52 +00:00

Fix warning C4530 (#3393)

* Fix warning C4530

* Rename FMT_EXCEPTIONS to FMT_USE_EXCEPTIONS
This commit is contained in:
Hinageshi 2025-04-24 00:46:25 +08:00 committed by GitHub
parent 847db3375f
commit 548b264254
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -304,12 +304,13 @@ endif ()
# ---------------------------------------------------------------------------------------
if (SPDLOG_NO_EXCEPTIONS)
if (NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
target_compile_definitions(spdlog PUBLIC FMT_EXCEPTIONS=0)
target_compile_definitions(spdlog PUBLIC FMT_USE_EXCEPTIONS=0)
endif ()
if (NOT MSVC)
target_compile_options(spdlog PRIVATE -fno-exceptions)
else ()
target_compile_options(spdlog PRIVATE /EHs-c-)
target_compile_definitions(spdlog PRIVATE _HAS_EXCEPTIONS=0)
endif ()
endif ()
# ---------------------------------------------------------------------------------------