ExternalProejctTools as a module (#1453)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 11 Sep 2018 10:37:08 +0000 (19:37 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 11 Sep 2018 10:37:08 +0000 (19:37 +0900)
Similarly as ExternalSourceTool, ExternalProejctTools also does not fin
into the concept of packages in nncc.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
cmake/modules/ExternalProjectTools.cmake [moved from cmake/packages/ExternalProjectToolsConfig.cmake with 76% similarity]
cmake/packages/CaffeConfig.cmake
cmake/packages/CaffeProtoConfig.cmake
cmake/packages/FarmhashConfig.cmake
cmake/packages/GFlagsConfig.cmake
cmake/packages/GTestConfig.cmake
cmake/packages/TensorFlowLiteConfig.cmake

similarity index 76%
rename from cmake/packages/ExternalProjectToolsConfig.cmake
rename to cmake/modules/ExternalProjectTools.cmake
index 7dde65f..11446c0 100644 (file)
@@ -1,5 +1,3 @@
 macro(add_extdirectory DIR TAG)
   add_subdirectory(${DIR} "${CMAKE_BINARY_DIR}/externals/${TAG}")
 endmacro(add_extdirectory)
-
-set(ExternalProjectTools_FOUND TRUE)
index 1b44d03..7b5eb2f 100644 (file)
@@ -51,7 +51,7 @@ function(_Caffe_import)
   endif()
 
   if(NOT TARGET caffe)
-    nncc_find_package(ExternalProjectTools REQUIRED)
+    nncc_include(ExternalProjectTools)
     add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/Caffe" caffe)
     message(STATUS "Found Caffe: TRUE")
   endif(NOT TARGET caffe)
index d965744..33c2395 100644 (file)
@@ -14,7 +14,7 @@ function(_CaffeProto_import)
   endif(NOT Protobuf_FOUND)
 
   if(NOT TARGET caffeproto)
-    nncc_find_package(ExternalProjectTools REQUIRED)
+    nncc_include(ExternalProjectTools)
     add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/CaffeProto" caffeproto)
   endif(NOT TARGET caffeproto)
 
index e3f5e5c..68f3d7c 100644 (file)
@@ -7,7 +7,7 @@ function(_Farmhash_import)
   endif(NOT FarmhashSource_FOUND)
 
   if(NOT TARGET farmhash)
-    nncc_find_package(ExternalProjectTools REQUIRED)
+    nncc_include(ExternalProjectTools)
     add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/Farmhash" farmhash)
   endif(NOT TARGET farmhash)
 
index 5b6f640..891320a 100644 (file)
@@ -7,7 +7,7 @@ function(_GFlags_import)
   nncc_find_package(GFlagsSource QUIET)
 
   if(GFlagsSource_FOUND)
-    nncc_find_package(ExternalProjectTools REQUIRED)
+    nncc_include(ExternalProjectTools)
     # build shared multi-threading gflag library
     set(BUILD_SHARED_LIBS On)
     set(BUILD_STATIC_LIBS Off)
index 32b1142..3b5337c 100644 (file)
@@ -1,6 +1,6 @@
 if(${BUILD_GTEST})
   nncc_include(ExternalSourceTools)
-  nncc_find_package(ExternalProjectTools REQUIRED)
+  nncc_include(ExternalProjectTools)
   nncc_find_package(OptionTools REQUIRED)
 
   envoption(GTEST_URL https://github.com/google/googletest/archive/release-1.8.0.tar.gz)
index cb5e5e5..dcf59cd 100644 (file)
@@ -42,7 +42,7 @@ function(_TensorFlowLite_import)
   endif(NOT NEON2SSE_FOUND)
 
   if(NOT TARGET tensorflowlite)
-    nncc_find_package(ExternalProjectTools REQUIRED)
+    nncc_include(ExternalProjectTools)
     add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/TensorFlowLite" tflite)
   endif(NOT TARGET tensorflowlite)