singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject [1/3] incubator-singa git commit: SINGA-67 Add singatest into build targets Modified Makefile.am to add a target named "singatest"i. Now "make" will generate 5 files/libs: libsinga.la libgtest.la singa singatool singatest. User can also specify the targe
Date Sun, 13 Sep 2015 13:18:06 GMT
Repository: incubator-singa
Updated Branches:
  refs/heads/master 50deedd49 -> 5d7d53f52


SINGA-67 Add singatest into build targets
Modified Makefile.am to add a target named "singatest"i.
Now "make" will generate 5 files/libs: libsinga.la libgtest.la singa singatool singatest.
User can also specify the target he wants to generate, for example, "make 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/bc400a74
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/bc400a74
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/bc400a74

Branch: refs/heads/master
Commit: bc400a7422a9671c9d7672b898f4f0ac9f271a77
Parents: 50deedd
Author: xiezl <xiezhongle@comp.nus.edu.sg>
Authored: Sun Sep 6 12:54:14 2015 +0800
Committer: xiezl <xiezhongle@comp.nus.edu.sg>
Committed: Sun Sep 6 12:54:14 2015 +0800

----------------------------------------------------------------------
 Makefile.am | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/bc400a74/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index deca6e6..732b84e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -78,6 +78,14 @@ SINGA_HDRS := include/singa.h \
               include/communication/msg.h \
               include/communication/socket.h
 
+GTEST_SRCS := include/gtest/gtest-all.cc
+GTEST_HRDS := include/gtest/gtest.h
+TEST_SRCS := include/gtest/gtest_main.cc \
+			 src/test/test_cluster.cc \
+			 src/test/test_msg.cc \
+			 src/test/test_neuralnet.cc \
+			 src/test/test_paramslicer.cc \
+			 src/test/test_shard.cc
 
 lib_LTLIBRARIES = libsinga.la
 libsinga_la_SOURCES = $(PROTO_HDRS) $(PROTO_SRCS) $(SINGA_HDRS) $(SINGA_SRCS)
@@ -89,6 +97,17 @@ libsinga_la_CXXFLAGS += -DUSE_LMDB
 endif
 libsinga_la_LDFLAGS = -I./include
 
+lib_LTLIBRARIES += libgtest.la
+libgtest_la_SOURCES = $(GTEST_HDRS) $(GTEST_SRCS)
+libgtest_la_CXXFLAGS = -O3 -Wall -pthread -fPIC -std=c++11 -Wno-unknown-pragmas \
+                       $(MSHADOW_FLAGS) -DCPU_ONLY=1 -funroll-loops -gdwarf-2 -msse3 \
+                       -gstrict-dwarf -Woverloaded-virtual -DTHREADED -fpermissive
+if LMDB
+libgtest_la_CXXFLAGS += -DUSE_LMDB
+endif
+libgtest_la_LDFLAGS = -I./include
+
+
 bin_PROGRAMS = singa
 singa_SOURCES = src/main.cc
 singa_CXXFLAGS = -O3 -Wall -pthread -fPIC -std=c++11 -MMD -Wno-unknown-pragmas \
@@ -116,6 +135,24 @@ singatool_LDFLAGS = -I./include \
                     -lprotobuf \
                     -lzookeeper_mt
 
+bin_PROGRAMS += singatest
+singatest_SOURCES = $(GTEST_HDRS) $(TEST_SRCS)
+singatest_CXXFLAGS = -O3 -Wall -pthread -fPIC -std=c++11 -MMD -Wno-unknown-pragmas \
+                 $(MSHADOW_FLAGS) -DCPU_ONLY=1 -funroll-loops -DTHREADED
+singatest_LDFLAGS = -I./include \
+                -lsinga \
+                -lglog  \
+                -lprotobuf \
+                -lrt \
+                -lopenblas \
+                -lzmq \
+                -lczmq \
+                -lzookeeper_mt \
+				-lgtest
+if LMDB
+singatest_LDFLAGS += -llmdb
+endif
+
 clean-local:
 	rm -rf $(PROTO_SRCS) $(PROTO_HDRS)
 	rm -rf $(PROTO_PYS)


Mime
View raw message