You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2016/08/14 06:10:42 UTC
[1/4] incubator-singa git commit: SINGA-229 Complete install targets
Repository: incubator-singa
Updated Branches:
refs/heads/dev a91bf2a7e -> dffae6bf3
SINGA-229 Complete install targets
Copy all related files into the prefix folders.
Add glog detection in cmake/Dependencies.cmake. Please uncomment the codes if you want to test.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/e39be3e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/e39be3e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/e39be3e2
Branch: refs/heads/dev
Commit: e39be3e2022d11e5344e9ab3bf61cda55868387d
Parents: db5478e
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Mon Aug 8 10:25:49 2016 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Mon Aug 8 10:25:49 2016 +0800
----------------------------------------------------------------------
CMakeLists.txt | 5 +++++
cmake/Dependencies.cmake | 7 +++++++
2 files changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e39be3e2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23f8ef6..4661c58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,3 +49,8 @@ ENDIF()
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(test)
ADD_SUBDIRECTORY(examples)
+
+INSTALL(DIRECTORY include/singa DESTINATION include)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/include/singa/singa_config.h DESTINATION include)
+INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/lib DESTINATION ${CMAKE_INSTALL_PREFIX})
+INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e39be3e2/cmake/Dependencies.cmake
----------------------------------------------------------------------
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 68d0bfc..4db8a85 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -8,6 +8,13 @@ MESSAGE(STATUS "proto libs " ${PROTOBUF_LIBRARIES})
LIST(APPEND singa_linker_libs ${PROTOBUF_LIBRARIES})
INCLUDE("cmake/Protobuf.cmake")
+#FIND_PACKAGE(Glog)
+#IF(GLOG_FOUND)
+# MESSAGE(STATUS "GLOG FOUND at ${GLOG_INCLUDE_DIR}")
+# ADD_DEFINITIONS("-DUSE_GLOG")
+# LIST(APPEND SINGA_LINKER_LIBS ${GLOG_LIBRARIES})
+#ENDIF()
+
IF(USE_LMDB)
FIND_PACKAGE(LMDB REQUIRED)
INCLUDE_DIRECTORIES(SYSTEM ${LMDB_INCLUDE_DIR})
[4/4] incubator-singa git commit: Merge PR #228 which updates cmake
files to enable 'make install'.
Posted by wa...@apache.org.
Merge PR #228 which updates cmake files to enable 'make install'.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/dffae6bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/dffae6bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/dffae6bf
Branch: refs/heads/dev
Commit: dffae6bf33b316a49ed1315e439b8e8948552f1c
Parents: a91bf2a 230230c
Author: Wei Wang <wa...@comp.nus.edu.sg>
Authored: Sun Aug 14 13:59:35 2016 +0800
Committer: Wei Wang <wa...@comp.nus.edu.sg>
Committed: Sun Aug 14 13:59:35 2016 +0800
----------------------------------------------------------------------
CMakeLists.txt | 7 +++++++
cmake/Dependencies.cmake | 7 +++++++
src/CMakeLists.txt | 10 +++++-----
test/CMakeLists.txt | 5 ++---
4 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/dffae6bf/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/dffae6bf/cmake/Dependencies.cmake
----------------------------------------------------------------------
diff --cc cmake/Dependencies.cmake
index ceef429,4db8a85..eb729db
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@@ -5,9 -5,16 +5,16 @@@ SET(SINGA_LINKER_LIBS ""
FIND_PACKAGE( Protobuf REQUIRED )
INCLUDE_DIRECTORIES(SYSTEM ${PROTOBUF_INCLUDE_DIR})
MESSAGE(STATUS "proto libs " ${PROTOBUF_LIBRARIES})
-LIST(APPEND singa_linker_libs ${PROTOBUF_LIBRARIES})
+LIST(APPEND SINGA_LINKER_LIBS ${PROTOBUF_LIBRARIES})
INCLUDE("cmake/Protobuf.cmake")
+ #FIND_PACKAGE(Glog)
+ #IF(GLOG_FOUND)
+ # MESSAGE(STATUS "GLOG FOUND at ${GLOG_INCLUDE_DIR}")
+ # ADD_DEFINITIONS("-DUSE_GLOG")
+ # LIST(APPEND SINGA_LINKER_LIBS ${GLOG_LIBRARIES})
+ #ENDIF()
+
IF(USE_LMDB)
FIND_PACKAGE(LMDB REQUIRED)
INCLUDE_DIRECTORIES(SYSTEM ${LMDB_INCLUDE_DIR})
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/dffae6bf/src/CMakeLists.txt
----------------------------------------------------------------------
diff --cc src/CMakeLists.txt
index 66d89dc,f6fa698..4579a67
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@@ -20,10 -19,8 +20,10 @@@ FOREACH(fil ${proto_hdrs}
#COMMAND ${CMAKE_COMMAND} -E echo "copy done"
)
ENDFOREACH()
- LIST(APPEND SINGA_LINKER_LIBS proto)
+ LIST(APPEND SINGA_LINKER_LIBS singa_proto)
+SET(PREVIOUS_LINKER_LIBS ${SINGA_LINKER_LIBS})
+
#FILE(GLOB_RECURSE utils_source ${CMAKE_CURRENT_SOURCE_DIR}/utils/ "*.cc")
AUX_SOURCE_DIRECTORY(utils utils_source)
#message(STATUS "UTILS ${utils_source}")
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/dffae6bf/test/CMakeLists.txt
----------------------------------------------------------------------
diff --cc test/CMakeLists.txt
index f196928,1c2550b..6fc4d77
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@@ -17,11 -9,9 +17,10 @@@ IF(NOT USE_OPENCL
LIST(REMOVE_ITEM singa_test_source "singa/test_opencl.cc")
ENDIF()
+
ADD_EXECUTABLE(test_singa "gtest/gtest_main.cc" ${singa_test_source})
ADD_DEPENDENCIES(test_singa singa_core singa_utils)
-MESSAGE(STATUS "link libs" ${singa_linker_libs})
+#MESSAGE(STATUS "link libs" ${singa_linker_libs})
TARGET_LINK_LIBRARIES(test_singa gtest singa_core singa_utils singa_model
- singa_io proto protobuf ${SINGA_LINKER_LIBS})
- SET_TARGET_PROPERTIES(test_singa PROPERTIES LINK_FLAGS "${LINK_FLAGS} -pthread ")
-
+ singa_io singa_proto protobuf ${SINGA_LINKER_LIBS})
+ SET_TARGET_PROPERTIES(test_singa PROPERTIES LINK_FLAGS "${LINK_FLAGS} -pthread")
[3/4] incubator-singa git commit: SINGA-229 Complete install targets
Posted by wa...@apache.org.
SINGA-229 Complete install targets
Modify lib names.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/230230ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/230230ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/230230ce
Branch: refs/heads/dev
Commit: 230230cea2d45cbb88a385ac6e84fe34959117e9
Parents: a0af465
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Sat Aug 13 15:57:04 2016 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Sat Aug 13 15:57:04 2016 +0800
----------------------------------------------------------------------
CMakeLists.txt | 3 ++-
src/CMakeLists.txt | 10 +++++-----
test/CMakeLists.txt | 2 +-
3 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/230230ce/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32d3b8e..994bd51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,5 +53,6 @@ ADD_SUBDIRECTORY(examples)
INSTALL(DIRECTORY include/singa DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
INSTALL(FILES ${CMAKE_BINARY_DIR}/include/singa/singa_config.h DESTINATION
${CMAKE_INSTALL_PREFIX}/include/singa)
-INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/lib DESTINATION ${CMAKE_INSTALL_PREFIX})
+INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/lib DESTINATION ${CMAKE_INSTALL_PREFIX}
+ PATTERN "*libgtest.a" EXCLUDE )
#INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/230230ce/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 65a81fc..f6fa698 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,6 @@
-# generate protobuf sources
+# generate protobuf sources
-FILE(GLOB proto_files proto/*.proto)
+FILE(GLOB proto_files proto/*.proto)
protobuf_generate_cpp(proto_srcs proto_hdrs ${proto_files})
IF (USE_PYTHON)
protobuf_generate_python(proto_pys ${proto_files})
@@ -10,16 +10,16 @@ INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/include")
#message(STATUS "srcs: ${proto_srcs}")
#message(STATUS "hdrs: ${proto_hdrs}")
#message(STATUS "pys: ${proto_pys}")
-ADD_LIBRARY(proto STATIC ${proto_hdrs} ${proto_srcs} ${proto_pys})
+ADD_LIBRARY(singa_proto STATIC ${proto_hdrs} ${proto_srcs} ${proto_pys})
FOREACH(fil ${proto_hdrs})
ADD_CUSTOM_COMMAND(
- TARGET proto PRE_BUILD
+ TARGET singa_proto PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/include/singa/proto"
COMMAND ${CMAKE_COMMAND} -E copy ${fil} "${CMAKE_BINARY_DIR}/include/singa/proto"
#COMMAND ${CMAKE_COMMAND} -E echo "copy done"
)
ENDFOREACH()
-LIST(APPEND SINGA_LINKER_LIBS proto)
+LIST(APPEND SINGA_LINKER_LIBS singa_proto)
#FILE(GLOB_RECURSE utils_source ${CMAKE_CURRENT_SOURCE_DIR}/utils/ "*.cc")
AUX_SOURCE_DIRECTORY(utils utils_source)
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/230230ce/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 044d65a..1c2550b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -13,5 +13,5 @@ ADD_EXECUTABLE(test_singa "gtest/gtest_main.cc" ${singa_test_source})
ADD_DEPENDENCIES(test_singa singa_core singa_utils)
MESSAGE(STATUS "link libs" ${singa_linker_libs})
TARGET_LINK_LIBRARIES(test_singa gtest singa_core singa_utils singa_model
- singa_io proto protobuf ${SINGA_LINKER_LIBS})
+ singa_io singa_proto protobuf ${SINGA_LINKER_LIBS})
SET_TARGET_PROPERTIES(test_singa PROPERTIES LINK_FLAGS "${LINK_FLAGS} -pthread")
[2/4] incubator-singa git commit: SINGA-229 Complete install targets
Posted by wa...@apache.org.
SINGA-229 Complete install targets
Remove bin/ from install folder.
Move singa_config.h into include/singa/.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/a0af4658
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/a0af4658
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/a0af4658
Branch: refs/heads/dev
Commit: a0af4658c3545009c9ee8f58acd8bd8c047e4ebb
Parents: e39be3e
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Wed Aug 10 17:10:52 2016 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Thu Aug 11 11:06:39 2016 +0800
----------------------------------------------------------------------
CMakeLists.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/a0af4658/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4661c58..32d3b8e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,8 @@ ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(test)
ADD_SUBDIRECTORY(examples)
-INSTALL(DIRECTORY include/singa DESTINATION include)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/include/singa/singa_config.h DESTINATION include)
+INSTALL(DIRECTORY include/singa DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/include/singa/singa_config.h DESTINATION
+ ${CMAKE_INSTALL_PREFIX}/include/singa)
INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/lib DESTINATION ${CMAKE_INSTALL_PREFIX})
-INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
+#INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})