[nncc-cmake] Check external module path existance (#7646)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Fri, 20 Sep 2019 04:37:26 +0000 (13:37 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 20 Sep 2019 04:37:26 +0000 (13:37 +0900)
Check external module path existance and download if that is not exists
Same with nnfw

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
infra/nncc/cmake/modules/ExternalSourceTools.cmake

index e46c1ca..c8b7a1b 100644 (file)
@@ -39,7 +39,7 @@ function(ExternalSource_Download PREFIX)
   # Compare URL in STAMP file and the given URL
   Stamp_Check(URL_CHECK "${STAMP_PATH}" "${URL}")
 
-  if(NOT URL_CHECK)
+  if(NOT EXISTS "${OUT_DIR}" OR NOT URL_CHECK)
     file(REMOVE "${STAMP_PATH}")
     file(REMOVE_RECURSE "${OUT_DIR}")
     file(REMOVE_RECURSE "${TMP_DIR}")