You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

json.cmake 683 B

1234567891011121314151617181920
  1. set(nlohmann_json_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2")
  2. set(nlohmann_json_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
  3. if(ENABLE_GITEE)
  4. set(REQ_URL "https://gitee.com/mirrors/JSON-for-Modern-CPP/repository/archive/v3.6.1.zip")
  5. set(MD5 "5bda78ce308e6cfcf614dcf1d5ff27a7")
  6. set(INCLUDE "./include")
  7. else()
  8. set(REQ_URL "https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip")
  9. set(MD5 "0dc903888211db3a0f170304cd9f3a89")
  10. set(INCLUDE "./")
  11. endif()
  12. mindspore_add_pkg(nlohmann_json
  13. VER 3.6.1
  14. HEAD_ONLY ${INCLUDE}
  15. URL ${REQ_URL}
  16. MD5 ${MD5})
  17. include_directories(${nlohmann_json_INC})
  18. add_library(mindspore::json ALIAS nlohmann_json)