mirror of
https://gitee.com/mindspore/akg.git
synced 2025-12-06 11:59:12 +08:00
!450 use third_party/isl-0.22.tar.gz directly instead of download it online
Merge pull request !450 from looop5/isl_tar_r1.5
This commit is contained in:
@@ -3,19 +3,10 @@ set(isl_CONFIG_FILE_DIR "-DISL_WRAP_DIR=${AKG_SOURCE_DIR}/third_party/isl_wrap")
|
||||
set(isl_DEPEND_INCLUDE_DIR "-DGMP_INCLUDE_DIR=${GMP_INCLUDE_DIR}")
|
||||
set(isl_DEPEND_LIB_DIR "-DGMP_LIBRARY=${GMP_LIBRARY}")
|
||||
|
||||
if(ENABLE_GITEE)
|
||||
set(ISL_URL "https://gitee.com/mirrors/isl/repository/archive/isl-0.22?format=tar.gz")
|
||||
set(ISL_MD5 "edff5e9d0f62446ccaeb1e746903f5c8")
|
||||
else()
|
||||
set(ISL_URL "https://libisl.sourceforge.io/isl-0.22.tar.gz")
|
||||
set(ISL_MD5 "671d0a5e10467a5c6db0893255278845")
|
||||
endif()
|
||||
|
||||
akg_add_pkg(isl
|
||||
VER 0.22
|
||||
DIR ${AKG_SOURCE_DIR}/third_party/isl-0.22.tar.gz
|
||||
LIBS isl_fixed
|
||||
URL ${ISL_URL}
|
||||
MD5 ${ISL_MD5}
|
||||
CUSTOM_CMAKE ${AKG_SOURCE_DIR}/third_party/isl_wrap
|
||||
PATCHES ${AKG_SOURCE_DIR}/third_party/patch/isl/isl.patch ${AKG_SOURCE_DIR}/third_party/patch/isl/isl-influence.patch
|
||||
CMAKE_OPTION " ")
|
||||
|
||||
@@ -274,7 +274,33 @@ function(akg_add_pkg pkg_name )
|
||||
file(COPY ${${pkg_name}_INSTALL_SUBMODULE} DESTINATION ${${pkg_name}_SOURCE_DIR}/3rdparty/${_SUBMODENAME})
|
||||
endforeach (_SUBMODULE_FILE)
|
||||
else()
|
||||
set(${pkg_name}_SOURCE_DIR ${PKG_DIR})
|
||||
# Check if pkg is valid
|
||||
if(NOT EXISTS ${PKG_DIR})
|
||||
message(FATAL_ERROR "${PKG_DIR} not exits")
|
||||
endif()
|
||||
# If pkg is a directory, then use this directory directly
|
||||
if(IS_DIRECTORY ${PKG_DIR})
|
||||
set(${pkg_name}_SOURCE_DIR ${PKG_DIR})
|
||||
else()
|
||||
# Else, if pkg is a compressed file, decompress it first, then use the decompressed directory
|
||||
set(DECOMPRESS_DIR ${CMAKE_CURRENT_BINARY_DIR}/third_party/${pkg_name})
|
||||
if(EXISTS ${DECOMPRESS_DIR})
|
||||
file(REMOVE_RECURSE ${DECOMPRESS_DIR})
|
||||
endif()
|
||||
file(MAKE_DIRECTORY ${DECOMPRESS_DIR})
|
||||
message(STATUS "Decompressing ${PKG_DIR}")
|
||||
if(${PKG_DIR} MATCHES ".tar.gz$")
|
||||
execute_process(COMMAND tar -zxf ${PKG_DIR} -C ${DECOMPRESS_DIR}
|
||||
RESULT_VARIABLE DECOMPRESS_RESULT)
|
||||
if(NOT DECOMPRESS_RESULT EQUAL 0)
|
||||
message(FATAL_ERROR "Decompress failed: ${PKG_DIR}")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "pkg can only be a directory or a .tar.gz file now, but got: ${PKG_DIR}")
|
||||
endif()
|
||||
FILE(GLOB ALL_FILES ${DECOMPRESS_DIR}/*)
|
||||
list(GET ALL_FILES 0 ${pkg_name}_SOURCE_DIR)
|
||||
endif()
|
||||
endif()
|
||||
message("${pkg_name}_SOURCE_DIR : ${${pkg_name}_SOURCE_DIR}")
|
||||
|
||||
|
||||
BIN
third_party/isl-0.22.tar.gz
vendored
Normal file
BIN
third_party/isl-0.22.tar.gz
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user