singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject [2/7] incubator-singa git commit: SINGA-242 Compile all source files into a single library.
Date Tue, 30 Aug 2016 14:35:40 GMT
SINGA-242 Compile all source files into a single library.

Modify targets and related source codes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/546c38bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/546c38bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/546c38bb

Branch: refs/heads/master
Commit: 546c38bb73f3ce7f1ae1ab72d604802e4bf01ae6
Parents: 40c9123
Author: xiezl <xiezhongle@comp.nus.edu.sg>
Authored: Mon Aug 29 12:01:05 2016 +0800
Committer: xiezl <xiezhongle@comp.nus.edu.sg>
Committed: Mon Aug 29 12:01:05 2016 +0800

----------------------------------------------------------------------
 src/CMakeLists.txt | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/546c38bb/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6c604d4..87486f7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -106,10 +106,15 @@ ADD_LIBRARY(singa SHARED ${singa_sources})
 ADD_CUSTOM_TARGET(
   copy_protobuf
   COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/include/singa/proto"
-  COMMAND ${CMAKE_COMMAND} -E copy ${proto_hdrs} "${CMAKE_BINARY_DIR}/include/singa/proto/"
   DEPENDS ${proto_hdrs}
-  COMMENT "Copying Protobuf files"
+  COMMENT "Copying Protobuf headers"
   )
+FOREACH(fil ${proto_hdrs})
+  ADD_CUSTOM_COMMAND(
+    TARGET copy_protobuf PRE_BUILD
+    COMMAND ${CMAKE_COMMAND} -E copy ${fil} "${CMAKE_BINARY_DIR}/include/singa/proto"
+ )
+ENDFOREACH()
 ADD_DEPENDENCIES(singa copy_protobuf)
 TARGET_LINK_LIBRARIES(singa ${SINGA_LINKER_LIBS})
 #MESSAGE(STATUS "HEADERS: ${proto_hdrs}")


Mime
View raw message