diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index 956466fc..192e145f 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -37,7 +37,9 @@ find_package(OpenVINO REQUIRED COMPONENTS Runtime Threading) include(FetchContent) -FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz) +FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json.git + GIT_TAG d41ca94fa85d5119852e2f7a3f94335cc7cb0486 # PR #4709, fixes cmake deprecation warnings + ) FetchContent_MakeAvailable(json) file(GLOB MODELS_SOURCES ./models/src/*.cpp) diff --git a/tests/cpp/accuracy/CMakeLists.txt b/tests/cpp/accuracy/CMakeLists.txt index c06077ba..c1792701 100644 --- a/tests/cpp/accuracy/CMakeLists.txt +++ b/tests/cpp/accuracy/CMakeLists.txt @@ -54,7 +54,9 @@ endif() include(CMakeParseArguments) include(FetchContent) -FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz) +FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json.git + GIT_TAG d41ca94fa85d5119852e2f7a3f94335cc7cb0486 # PR #4709, fixes cmake deprecation warnings + ) FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG a7f443b80b105f940225332ed3c31f2790092f47 # latest main diff --git a/tests/cpp/cmake/common.cmake b/tests/cpp/cmake/common.cmake index 9bb51b75..0a88dca3 100644 --- a/tests/cpp/cmake/common.cmake +++ b/tests/cpp/cmake/common.cmake @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -cmake_minimum_required(VERSION 3.11) +cmake_minimum_required(VERSION 3.26) macro(add_test) set(oneValueArgs NAME OPENCV_VERSION_REQUIRED) diff --git a/tests/cpp/precommit/CMakeLists.txt b/tests/cpp/precommit/CMakeLists.txt index b928ba4b..ab8c77ff 100644 --- a/tests/cpp/precommit/CMakeLists.txt +++ b/tests/cpp/precommit/CMakeLists.txt @@ -53,7 +53,9 @@ endif() include(CMakeParseArguments) include(FetchContent) -FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz) +FetchContent_Declare(json GIT_REPOSITORY https://github.com/nlohmann/json.git + GIT_TAG d41ca94fa85d5119852e2f7a3f94335cc7cb0486 # PR #4709, fixes cmake deprecation warnings + ) FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG a7f443b80b105f940225332ed3c31f2790092f47 # latest main