From 0c35247b58207e26059cd9a10055de02a2e49a7d Mon Sep 17 00:00:00 2001 From: qianlong Date: Tue, 7 Jul 2020 14:22:45 +0800 Subject: [PATCH] change icu4c compile way --- cmake/external_libs/icu4c.cmake | 4 ++-- scripts/build_icu4c.sh | 8 ++++++++ third_party/icu4c/filter.json | 6 ------ 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100755 scripts/build_icu4c.sh delete mode 100644 third_party/icu4c/filter.json diff --git a/cmake/external_libs/icu4c.cmake b/cmake/external_libs/icu4c.cmake index 7d13e4fd2ad..af69328e55a 100644 --- a/cmake/external_libs/icu4c.cmake +++ b/cmake/external_libs/icu4c.cmake @@ -9,11 +9,11 @@ else() LIBS ${LIB_ICU_COMMON} ${LIB_ICU_DATA} ${LIB_ICU_I18N} URL https://github.com/unicode-org/icu/archive/release-67-1.tar.gz MD5 0c2662a2b0bc80b0eb56495205247c8f - CONFIGURE_COMMAND ./icu4c/source/runConfigureICU Linux --enable-rpath --disable-tests --disable-samples --disable-icuio --disable-extras ICU_DATA_FILTER_FILE=${CMAKE_SOURCE_DIR}/third_party/icu4c/filter.json + CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/scripts/build_icu4c.sh ) include_directories(${icu4c_INC}) add_library(mindspore::icuuc ALIAS icu4c::${LIB_ICU_COMMON}) add_library(mindspore::icudata ALIAS icu4c::${LIB_ICU_DATA}) add_library(mindspore::icui18n ALIAS icu4c::${LIB_ICU_I18N}) add_definitions(-D ENABLE_ICU4C) -endif() \ No newline at end of file +endif() diff --git a/scripts/build_icu4c.sh b/scripts/build_icu4c.sh new file mode 100755 index 00000000000..c7f21b756f6 --- /dev/null +++ b/scripts/build_icu4c.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo '{ + "strategy": "additive", + "featureFilters": { + "normalization": "include" + } +}' > filter.json +./icu4c/source/runConfigureICU Linux --enable-rpath --disable-tests --disable-samples --disable-icuio --disable-extras ICU_DATA_FILTER_FILE=filter.json "$@" diff --git a/third_party/icu4c/filter.json b/third_party/icu4c/filter.json deleted file mode 100644 index b3decad8fb4..00000000000 --- a/third_party/icu4c/filter.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strategy": "additive", - "featureFilters": { - "normalization": "include" - } -} \ No newline at end of file