From 05feb8201254ad5220ccc6ee97ccdd2349f213a5 Mon Sep 17 00:00:00 2001 From: liubuyu Date: Fri, 16 Oct 2020 19:11:02 +0800 Subject: [PATCH] bug fix when enable download json from gitee --- cmake/external_libs/json.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/external_libs/json.cmake b/cmake/external_libs/json.cmake index 5c817764bae..74c3affdc9e 100644 --- a/cmake/external_libs/json.cmake +++ b/cmake/external_libs/json.cmake @@ -4,14 +4,16 @@ set(nlohmann_json_CFLAGS "-D_FORTIFY_SOURCE=2 -O2") if (ENABLE_GITEE) set(REQ_URL "https://gitee.com/mirrors/JSON-for-Modern-CPP/repository/archive/v3.6.1.zip") set(MD5 "5bda78ce308e6cfcf614dcf1d5ff27a7") + set(INCLUDE "./include") else() set(REQ_URL "https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip") set(MD5 "0dc903888211db3a0f170304cd9f3a89") + set(INCLUDE "./") endif () mindspore_add_pkg(nlohmann_json VER 3.6.1 - HEAD_ONLY ./ + HEAD_ONLY ${INCLUDE} URL ${REQ_URL} MD5 ${MD5}) include_directories(${nlohmann_json_INC})