Check external directory exists (#3522)
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 8 Nov 2018 06:40:53 +0000 (15:40 +0900)
committer이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Thu, 8 Nov 2018 06:40:53 +0000 (15:40 +0900)
Check external directory exists and download if directory does not exist

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

index c6900a2..76ebb55 100644 (file)
@@ -21,7 +21,7 @@ function(ExternalSource_Download PREFIX URL)
     endif("${SAVED_URL}" STREQUAL "${URL}")
   endif(EXISTS "${STAMP_PATH}")
 
-  if(NOT EXISTS "${STAMP_PATH}" OR NOT MATCH_URL)
+  if(NOT EXISTS "${STAMP_PATH}" OR NOT EXISTS "${OUT_DIR}" OR NOT MATCH_URL)
     file(REMOVE_RECURSE "${OUT_DIR}")
     file(REMOVE_RECURSE "${TMP_DIR}")