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/17 18:02:45 UTC
[24/51] [abbrv] incubator-singa git commit: SINGA-237 New
documentation files for SINGA v1.0
SINGA-237 New documentation files for SINGA v1.0
Update installation.md.
Update flags in MacOS.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/30731ee4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/30731ee4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/30731ee4
Branch: refs/heads/master
Commit: 30731ee412f85c80f2d8ce81671eaa7a84d53524
Parents: d3a57cf
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Mon Aug 15 16:42:25 2016 +0800
Committer: xiezl <xi...@comp.nus.edu.sg>
Committed: Mon Aug 15 16:42:25 2016 +0800
----------------------------------------------------------------------
doc/docs/installation.md | 20 +++++++++++---------
test/CMakeLists.txt | 5 ++++-
2 files changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/30731ee4/doc/docs/installation.md
----------------------------------------------------------------------
diff --git a/doc/docs/installation.md b/doc/docs/installation.md
index 8ab617f..4cf4ea7 100755
--- a/doc/docs/installation.md
+++ b/doc/docs/installation.md
@@ -36,24 +36,29 @@ which could be downloaded as
$ git submodule update
-### Linux OS
+### Linux & MacOS
+
+GCC (>=4.8.1) is required to compile SINGA on Linux.
+You can use gcc compiler to do the installation on MacOS following the
+steps in Linux installation.
+In addition, you can also install singa via clang compiler following the
+commands in this section.
-GCC (>=4.8.1) is required to compile SINGA on Linux OS.
In SINGA_ROOT, execute the following commands for compiling SINGA,
$ mkdir build && cd build
- # generate Makefile for compilation
$ cmake ..
- # compile SINGA
$ make
-Note that if you are using CUDNN, you need to let cmake know the paths to CUDNN,
+Note that if you are using CUDNN and it is not installed under system default
+folder, you need to let cmake know the paths to CUDNN,
$ export CMAKE_INCLUDE_PATH=<path to cudnn>/include:$CMAKE_INCLUDE_PATH
$ export CMAKE_LIBRARY_PATH=<path to cudnn>/lib64:$CMAKE_LIBRARY_PATH
You can use `ccmake ..` to configure the compilation options including using
-LMDB, GLOG, etc.
+LMDB, GLOG, etc. In addition, you can set the proper search paths for the
+dependent libraries.
After compiling SINGA, you can run the unit tests by
@@ -63,7 +68,4 @@ You can see all the testing cases with testing results. If SINGA passes all
tests, then you have successfully installed SINGA. Please proceed to try the examples!
-### MacOS
-
-
### Windows
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/30731ee4/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f196928..6e7dd84 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -23,5 +23,8 @@ 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})
-SET_TARGET_PROPERTIES(test_singa PROPERTIES LINK_FLAGS "${LINK_FLAGS} -pthread ")
+IF(UNIX AND (NOT APPLE))
+ LIST(APPEND LINK_FLAGS "-pthread")
+ENDIF()
+SET_TARGET_PROPERTIES(test_singa PROPERTIES LINK_FLAGS "${LINK_FLAGS}")