mirror of
https://github.com/nlohmann/json.git
synced 2026-10-13 17:57:14 +00:00
✅ add test to compile without exceptions
This commit is contained in:
4 files changed
+16
-5
No files matched your search
@@ -11,3 +11,10 @@ target_link_libraries(with_namespace_target nlohmann_json::nlohmann_json)
|
||||
|
||||
add_executable(without_namespace_target main.cpp)
|
||||
target_link_libraries(without_namespace_target nlohmann_json)
|
||||
|
||||
if(NOT MSVC)
|
||||
add_executable(without_exceptions main.cpp)
|
||||
target_link_libraries(without_exceptions nlohmann_json::nlohmann_json)
|
||||
target_compile_definitions(without_exceptions PRIVATE JSON_NOEXCEPTION)
|
||||
target_compile_options(without_exceptions PRIVATE -fno-exceptions)
|
||||
endif()
|
||||
Reference in new issue
Block a user