[nnfw-cmake] Rename nnfw_include (#7681)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 24 Sep 2019 04:15:58 +0000 (13:15 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 24 Sep 2019 04:15:58 +0000 (13:15 +0900)
Rename nnfw_include to nnas_include: prepare to use unified cmake module

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
25 files changed:
infra/nnfw/CMakeLists.txt
infra/nnfw/cmake/modules/ExternalSourceTools.cmake
infra/nnfw/cmake/packages/ARMComputeSourceConfig.cmake
infra/nnfw/cmake/packages/AbslSourceConfig.cmake
infra/nnfw/cmake/packages/BoostSourceConfig.cmake
infra/nnfw/cmake/packages/CpuinfoSourceConfig.cmake
infra/nnfw/cmake/packages/EigenSourceConfig.cmake
infra/nnfw/cmake/packages/Enum34SourceConfig.cmake
infra/nnfw/cmake/packages/FP16SourceConfig.cmake
infra/nnfw/cmake/packages/FXdivSourceConfig.cmake
infra/nnfw/cmake/packages/FarmhashSourceConfig.cmake
infra/nnfw/cmake/packages/FlatBuffersSourceConfig.cmake
infra/nnfw/cmake/packages/GEMMLowpSourceConfig.cmake
infra/nnfw/cmake/packages/GTestConfig.cmake
infra/nnfw/cmake/packages/NEON2SSESourceConfig.cmake
infra/nnfw/cmake/packages/NNPACKConfig.cmake
infra/nnfw/cmake/packages/NNPACKSourceConfig.cmake
infra/nnfw/cmake/packages/NoniusSourceConfig.cmake
infra/nnfw/cmake/packages/OpcodesSourceConfig.cmake
infra/nnfw/cmake/packages/PSIMDSourceConfig.cmake
infra/nnfw/cmake/packages/PeachpySourceConfig.cmake
infra/nnfw/cmake/packages/PthreadpoolSourceConfig.cmake
infra/nnfw/cmake/packages/SixSourceConfig.cmake
infra/nnfw/cmake/packages/TensorFlowLiteConfig.cmake
infra/nnfw/cmake/packages/TensorFlowSourceConfig.cmake

index f09a8d7..300bfbf 100644 (file)
@@ -18,9 +18,9 @@ set(NNFW_OVERLAY_DIR "${CMAKE_BINARY_DIR}/overlay" CACHE
 # This allows find_package to access configurations installed inside overlay
 list(APPEND CMAKE_PREFIX_PATH "${NNFW_OVERLAY_DIR}")
 
-macro(nnfw_include PREFIX)
+macro(nnas_include PREFIX)
   include("${CMAKE_SOURCE_DIR}/cmake/modules/${PREFIX}.cmake")
-endmacro(nnfw_include)
+endmacro(nnas_include)
 
 # 'find_package()' wrapper to find in cmake/packages folder
 #
@@ -45,7 +45,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
 # identify platform: HOST_PLATFORM, TARGET_PLATFORM and related
 # note: this should be placed before flags and options setting
-nnfw_include(IdentifyPlatform)
+nnas_include(IdentifyPlatform)
 
 # apply compilation flags
 # note: this should be placed after cmake/option/option_xxx.cmake files
@@ -84,7 +84,7 @@ if(ENABLE_COVERAGE)
   target_link_libraries(nnfw_coverage INTERFACE gcov)
 endif(ENABLE_COVERAGE)
 
-nnfw_include(AddSubdirectories)
+nnas_include(AddSubdirectories)
 
 add_library(nnfw-header INTERFACE)
 target_include_directories(nnfw-header INTERFACE ${NNAS_PROJECT_SOURCE_DIR}/runtimes/include)
index df7abd9..23183cb 100644 (file)
@@ -1,5 +1,5 @@
 function(ExternalSource_Download PREFIX URL)
-  nnfw_include(StampTools)
+  nnas_include(StampTools)
 
   get_filename_component(FILENAME ${URL} NAME)
 
@@ -66,7 +66,7 @@ function(ExternalSource_Download PREFIX URL)
 endfunction(ExternalSource_Download)
 
 function(ExternalSource_Get PREFIX DOWNLOAD_FLAG URL)
-  nnfw_include(StampTools)
+  nnas_include(StampTools)
 
   set(CACHE_DIR "${NNAS_EXTERNALS_DIR}")
   set(OUT_DIR "${CACHE_DIR}/${PREFIX}")
index ef7384d..d75d2cf 100644 (file)
@@ -1,6 +1,6 @@
 function(_ARMComputeSource_import)
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
   set(ARMCOMPUTE_URL ${EXTERNAL_DOWNLOAD_SERVER}/ARM-software/ComputeLibrary/archive/v19.05.tar.gz)
index 685550d..c3bab13 100644 (file)
@@ -1,6 +1,6 @@
 function(_AbslSource_import)
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   # NOTE The following URL comes from TensorFlow 1.12
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
index 1b81316..6181a97 100644 (file)
@@ -1,6 +1,6 @@
 function(_BoostSource_import)
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   # EXTERNAL_DOWNLOAD_SERVER will be overwritten by CI server to use mirror server.
   envoption(EXTERNAL_DOWNLOAD_SERVER "http://sourceforge.net")
index 0939ba3..ef85e5d 100644 (file)
@@ -1,6 +1,6 @@
 function(_cpuinfoSource_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(CPUINFO_URL ${EXTERNAL_DOWNLOAD_SERVER}/pytorch/cpuinfo/archive/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz)
index e9b0ba8..1fbcf13 100644 (file)
@@ -1,6 +1,6 @@
 function(_EigenSource_import)
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   # NOTE TensorFlow 1.12 downloads Eign from the following URL
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://bitbucket.org")
index 96b6ca8..29eb8bf 100644 (file)
@@ -1,6 +1,6 @@
 function(_enum34Source_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://bitbucket.org")
     set(ENUM34_URL ${EXTERNAL_DOWNLOAD_SERVER}/stoneleaf/enum34/get/1.1.6.tar.gz)
index 7df5294..c7e9db5 100644 (file)
@@ -1,6 +1,6 @@
 function(_FP16Source_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(FP16_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/FP16/archive/febbb1c163726b5db24bed55cc9dc42529068997.tar.gz)
index 2ea574a..1c375f9 100644 (file)
@@ -1,6 +1,6 @@
 function(_FXdivSource_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(FXDIV_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/FXdiv/archive/f8c5354679ec2597792bc70a9e06eff50c508b9a.tar.gz)
index b2cb988..cba3c3c 100644 (file)
@@ -1,6 +1,6 @@
 function(_FarmhashSource_import)
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   # NOTE TensorFlow 1.12 downloads farmhash from the following URL
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
index f8a85ef..5a59ef3 100644 (file)
@@ -1,6 +1,6 @@
 function(_FlatBuffersSource_import)
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   # NOTE TensorFlow 1.12 downloads FlatBuffers from the following URL
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
index 51b8ff9..d800cdc 100644 (file)
@@ -1,6 +1,6 @@
 function(_GEMMLowpSource_import)
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   # NOTE TensorFlow 1.12 uses the following URL
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
index 990a3d5..856d1b6 100644 (file)
@@ -1,7 +1,7 @@
 if(${BUILD_GTEST})
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(ExternalProjectTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(ExternalProjectTools)
+  nnas_include(OptionTools)
 
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
   set(GTEST_URL ${EXTERNAL_DOWNLOAD_SERVER}/google/googletest/archive/release-1.8.0.tar.gz)
index 114a512..b1bf6cf 100644 (file)
@@ -5,8 +5,8 @@ function(_NEON2SSESource_import)
     return()
   endif(NOT (TARGET_ARCH_BASE STREQUAL "x86_64"))
 
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   # NOTE TensorFlow 1.12 downloads NEON2SSE from the following URL
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
index 97382b7..afb1ad9 100644 (file)
@@ -31,7 +31,7 @@ function(_NNPACK_Import)
         set(NNPACK_LIBRARY_TYPE "static" CACHE STRING "")
         set(PTHREADPOOL_LIBRARY_TYPE "static" CACHE STRING "")
         set(CPUINFO_LIBRARY_TYPE "static" CACHE STRING "")
-        nnfw_include(ExternalProjectTools)
+        nnas_include(ExternalProjectTools)
         add_extdirectory("${NNPACK_SOURCE_DIR}" nnpack EXCLUDE_FROM_ALL)
         # We build static versions of nnpack and pthreadpool but link
         # them into a shared library (high-perf-backend), so they need PIC.
index b6b5b01..68c8234 100644 (file)
@@ -5,8 +5,8 @@ function(_NNPACKSource_import)
         return()
     endif(NOT DOWNLOAD_NNPACK)
 
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(NNPACK_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/NNPACK/archive/c039579abe21f5756e0f0e45e8e767adccc11852.tar.gz)
index 5dde6b4..88133f5 100644 (file)
@@ -1,6 +1,6 @@
 function(_NoniusSource_import)
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
   set(NONIUS_URL ${EXTERNAL_DOWNLOAD_SERVER}/libnonius/nonius/archive/v1.2.0-beta.1.tar.gz)
index 635249f..b48d10a 100644 (file)
@@ -1,11 +1,11 @@
 function(_PeachpySource_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(PEACHPY_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/Opcodes/archive/6e2b0cd9f1403ecaf164dea7019dd54db5aea252.tar.gz)
     ExternalSource_Get("python_opcodes" ${DOWNLOAD_NNPACK} ${PEACHPY_URL})
-        
+
     set(PYTHON_OPCODES_SOURCE_DIR ${python_opcodes_SOURCE_DIR} PARENT_SCOPE)
     set(PYTHON_OPCODES_SOURCE_FOUND ${python_opcodes_SOURCE_GET} PARENT_SCOPE)
 endfunction(_PeachpySource_import)
index 0f208cd..c14ad73 100644 (file)
@@ -1,6 +1,6 @@
 function(_PSIMDSource_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(PSIMD_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/psimd/archive/90a938f30ba414ada2f4b00674ee9631d7d85e19.tar.gz)
index 4cfd682..55be2b6 100644 (file)
@@ -1,6 +1,6 @@
 function(_PeachpySource_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(PEACHPY_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/PeachPy/archive/01d15157a973a4ae16b8046313ddab371ea582db.tar.gz)
index 0c3b61a..e440403 100644 (file)
@@ -1,6 +1,6 @@
 function(_pthreadpoolSource_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(PTHREADPOOL_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/pthreadpool/archive/6673a4c71fe35e077c6843a74017d9c25610c537.tar.gz)
index 309ead3..b466d3d 100644 (file)
@@ -1,6 +1,6 @@
 function(_SIXSource_import)
-    nnfw_include(ExternalSourceTools)
-    nnfw_include(OptionTools)
+    nnas_include(ExternalSourceTools)
+    nnas_include(OptionTools)
 
     envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
     set(six_URL ${EXTERNAL_DOWNLOAD_SERVER}/benjaminp/six/archive/1.11.0.tar.gz)
index 4dbc1d1..2b1c0ec 100644 (file)
@@ -29,7 +29,7 @@ if(BUILD_TENSORFLOW_LITE)
   # Optional packages
   nnfw_find_package(NEON2SSESource QUIET)
 
-  nnfw_include(ExternalProjectTools)
+  nnas_include(ExternalProjectTools)
   add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/TensorFlowLite" tflite)
 
   set(TensorFlowLite_FOUND TRUE)
index f9fd3af..1896239 100644 (file)
@@ -4,8 +4,8 @@ function(_TensorFlowSource_import)
     return()
   endif(NOT DOWNLOAD_TENSORFLOW)
 
-  nnfw_include(ExternalSourceTools)
-  nnfw_include(OptionTools)
+  nnas_include(ExternalSourceTools)
+  nnas_include(OptionTools)
 
   envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
   set(TENSORFLOW_URL ${EXTERNAL_DOWNLOAD_SERVER}/tensorflow/tensorflow/archive/v1.13.1.tar.gz)