From: 오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 Date: Mon, 22 Oct 2018 02:50:51 +0000 (+0900) Subject: Check url for external source download (#3275) X-Git-Tag: 0.3~561 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ea47b9828a2a6d2b3e0a16feb8eb5a115396d05;p=platform%2Fcore%2Fml%2Fnnfw.git Check url for external source download (#3275) Check url for external source download If download url is not matched, download again Signed-off-by: Hyeongseok Oh --- diff --git a/cmake/modules/ExternalSourceTools.cmake b/cmake/modules/ExternalSourceTools.cmake index cb18514..c6900a2 100644 --- a/cmake/modules/ExternalSourceTools.cmake +++ b/cmake/modules/ExternalSourceTools.cmake @@ -12,7 +12,16 @@ function(ExternalSource_Download PREFIX URL) file(MAKE_DIRECTORY "${CACHE_DIR}") endif(NOT EXISTS "${CACHE_DIR}") - if(NOT EXISTS "${STAMP_PATH}") + # TODO Check MD5 for correctness + set(MATCH_URL FALSE) + if(EXISTS "${STAMP_PATH}") + file(READ "${STAMP_PATH}" SAVED_URL) + if("${SAVED_URL}" STREQUAL "${URL}") + set(MATCH_URL TRUE) + endif("${SAVED_URL}" STREQUAL "${URL}") + endif(EXISTS "${STAMP_PATH}") + + if(NOT EXISTS "${STAMP_PATH}" OR NOT MATCH_URL) file(REMOVE_RECURSE "${OUT_DIR}") file(REMOVE_RECURSE "${TMP_DIR}")