• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if(ENABLE_GITEE)
2    set(REQ_URL "https://gitee.com/mirrors/c-ares/repository/archive/cares-1_15_0.tar.gz")
3    set(MD5 "db0ebedc297316e4713f439e1530ad99")
4else()
5    set(REQ_URL "https://github.com/c-ares/c-ares/releases/download/cares-1_15_0/c-ares-1.15.0.tar.gz")
6    set(MD5 "d2391da274653f7643270623e822dff7")
7endif()
8
9mindspore_add_pkg(c-ares
10        VER 1.15.0
11        LIBS cares
12        URL ${REQ_URL}
13        MD5 ${MD5}
14        CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release
15        -DCARES_SHARED:BOOL=OFF
16        -DCARES_STATIC:BOOL=ON
17        -DCARES_STATIC_PIC:BOOL=ON
18        -DHAVE_LIBNSL:BOOL=OFF
19        PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/c-ares/CVE-2021-3672.patch)
20
21include_directories(${c-ares_INC})
22add_library(mindspore::cares ALIAS c-ares::cares)
23