Extract eigen3.cmake from external/CMakeLists.txt
authorJonghyun Park <jh1302.park@samsung.com>
Thu, 22 Mar 2018 06:26:47 +0000 (15:26 +0900)
committer박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Thu, 22 Mar 2018 10:22:28 +0000 (19:22 +0900)
This commit extracts Eigen-related commands from external/CMakeLists.txt
to simplify external/CMakeLists.txt.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
externals/CMakeLists.txt
externals/eigen3.cmake [new file with mode: 0644]

index 02d21ff..a968fd1 100644 (file)
 set(TENSORFLOW_BASE ${CMAKE_CURRENT_SOURCE_DIR}/tensorflow)
 set(TENSORFLOW_LITE_BASE ${TENSORFLOW_BASE}/tensorflow/contrib/lite)
 
-# Eigen 3
-file(GLOB_RECURSE EIGEN3_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/eigen/*.h")
-
-# NOTE From 3.x, CMake supports INTERFACE library feature. Unfortunately,
-#      CMake 2.8.12 (which Ubuntu 14.04 provides) does not support this
-#      library feature.
-add_library(eigen3 STATIC ${EIGEN3_HDRS})
-set_target_properties(eigen3 PROPERTIES LINKER_LANGUAGE CXX)
-target_include_directories(eigen3 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/eigen")
+include(eigen3.cmake)
 
 #
 # Protocol Buffer (>= 3.5.1)
diff --git a/externals/eigen3.cmake b/externals/eigen3.cmake
new file mode 100644 (file)
index 0000000..21ec318
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# Eigen 3
+#
+file(GLOB_RECURSE EIGEN3_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/eigen/*.h")
+
+# NOTE From 3.x, CMake supports INTERFACE library feature. Unfortunately,
+#      CMake 2.8.12 (which Ubuntu 14.04 provides) does not support this
+#      library feature.
+add_library(eigen3 STATIC ${EIGEN3_HDRS})
+set_target_properties(eigen3 PROPERTIES LINKER_LANGUAGE CXX)
+target_include_directories(eigen3 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/eigen")