mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Add option to disable implicit json conversions
This commit is contained in:
parent
ef941920ea
commit
13d219e8bb
2 changed files with 9 additions and 0 deletions
|
@ -63,6 +63,7 @@ build-gcc9:
|
||||||
-DVOIP=OFF
|
-DVOIP=OFF
|
||||||
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
|
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
|
||||||
-DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF
|
-DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF
|
||||||
|
-DJSON_ImplicitConversions=OFF
|
||||||
- cmake --build build
|
- cmake --build build
|
||||||
after_script:
|
after_script:
|
||||||
- mv ../.hunter .hunter
|
- mv ../.hunter .hunter
|
||||||
|
|
|
@ -11,6 +11,7 @@ else()
|
||||||
option(MAN "Build man page" OFF)
|
option(MAN "Build man page" OFF)
|
||||||
endif()
|
endif()
|
||||||
option(FLATPAK "Set this only if Nheko is built as a flatpak" OFF)
|
option(FLATPAK "Set this only if Nheko is built as a flatpak" OFF)
|
||||||
|
option(JSON_ImplicitConversions "Disable implicit conversions in nlohmann/json" ON)
|
||||||
|
|
||||||
set(
|
set(
|
||||||
CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/toolchain.cmake"
|
CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/toolchain.cmake"
|
||||||
|
@ -686,6 +687,13 @@ if (USE_BUNDLED_QTKEYCHAIN)
|
||||||
target_include_directories(nheko PRIVATE ${qt5keychain_SOURCE_DIR} ${qt5keychain_BINARY_DIR})
|
target_include_directories(nheko PRIVATE ${qt5keychain_SOURCE_DIR} ${qt5keychain_BINARY_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT JSON_ImplicitConversions)
|
||||||
|
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES
|
||||||
|
INTERFACE_COMPILE_DEFINITIONS "JSON_USE_IMPLICIT_CONVERSIONS=\$<BOOL:OFF>;JSON_DIAGNOSTICS=\$<BOOL:OFF>"
|
||||||
|
)
|
||||||
|
target_compile_definitions(nheko PUBLIC JSON_USE_IMPLICIT_CONVERSIONS=0)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(nheko PRIVATE
|
target_link_libraries(nheko PRIVATE
|
||||||
${COEURL_TARGET_NAME}
|
${COEURL_TARGET_NAME}
|
||||||
MatrixClient::MatrixClient
|
MatrixClient::MatrixClient
|
||||||
|
|
Loading…
Reference in a new issue