File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,14 +255,17 @@ if (FLUSS_ENABLE_TESTING)
255255 )
256256 set (gtest_force_shared_crt ON CACHE BOOL "" FORCE )
257257
258- set (JSON_BuildTests OFF CACHE INTERNAL "" )
259- FetchContent_Declare (
260- nlohmann_json
261- URL https://github.com/nlohmann/json/archive/refs/tags/v${FLUSS_NLOHMANN_JSON_VERSION} .tar.gz
262- URL_HASH SHA256=0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406
263- )
264-
265- FetchContent_MakeAvailable (googletest nlohmann_json)
258+ FetchContent_MakeAvailable (googletest)
259+
260+ if (NOT TARGET nlohmann_json::nlohmann_json)
261+ set (JSON_BuildTests OFF CACHE INTERNAL "" )
262+ FetchContent_Declare (
263+ nlohmann_json
264+ URL https://github.com/nlohmann/json/archive/refs/tags/v${FLUSS_NLOHMANN_JSON_VERSION} .tar.gz
265+ URL_HASH SHA256=0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406
266+ )
267+ FetchContent_MakeAvailable (nlohmann_json)
268+ endif ()
266269
267270 enable_testing ()
268271 include (GoogleTest )
You can’t perform that action at this time.
0 commit comments