blob: 33e71a3158a8541a3208a697c4db86bd26d5c6e3 [file] [log] [blame]
Roger Meierd3b9dca2011-06-24 14:01:10 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
Roger Meier81a1f992014-10-22 14:09:43 +020019AUTOMAKE_OPTIONS = subdir-objects serial-tests
20
Roger Meierd3b9dca2011-06-24 14:01:10 +000021noinst_LTLIBRARIES = libtestgencpp.la libstresstestgencpp.la
22nodist_libtestgencpp_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020023 gen-cpp/ThriftTest_constants.cpp \
24 gen-cpp/ThriftTest_constants.h \
25 gen-cpp/ThriftTest_types.cpp \
26 gen-cpp/ThriftTest_types.h \
27 gen-cpp/ThriftTest_types.tcc \
28 gen-cpp/ThriftTest.cpp \
29 gen-cpp/ThriftTest.h \
30 gen-cpp/ThriftTest.tcc \
31 src/ThriftTest_extras.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000032
33libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
34
35nodist_libstresstestgencpp_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020036 gen-cpp/StressTest_constants.cpp \
37 gen-cpp/StressTest_types.cpp \
38 gen-cpp/StressTest_constants.h \
39 gen-cpp/StressTest_types.h \
40 gen-cpp/Service.cpp \
41 gen-cpp/Service.h
Roger Meierd3b9dca2011-06-24 14:01:10 +000042
43libstresstestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
44
45check_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020046 TestServer \
47 TestClient \
48 StressTest \
49 StressTestNonBlocking
Roger Meierd3b9dca2011-06-24 14:01:10 +000050
51# we currently do not run the testsuite, stop c++ server issue
52# TESTS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020053# $(check_PROGRAMS)
Roger Meierd3b9dca2011-06-24 14:01:10 +000054
55TestServer_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020056 src/TestServer.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000057
58TestServer_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020059 libtestgencpp.la \
60 $(top_builddir)/lib/cpp/libthrift.la \
61 $(top_builddir)/lib/cpp/libthriftz.la \
62 $(top_builddir)/lib/cpp/libthriftnb.la \
63 -levent -lboost_program_options -lboost_system -lboost_filesystem
Roger Meierd3b9dca2011-06-24 14:01:10 +000064
65TestClient_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020066 src/TestClient.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000067
68TestClient_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020069 libtestgencpp.la \
70 $(top_builddir)/lib/cpp/libthrift.la \
71 $(top_builddir)/lib/cpp/libthriftz.la \
72 $(top_builddir)/lib/cpp/libthriftnb.la \
73 -levent -lboost_program_options -lboost_system -lboost_filesystem
Roger Meierd3b9dca2011-06-24 14:01:10 +000074
75StressTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020076 src/StressTest.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000077
78StressTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020079 libstresstestgencpp.la \
80 $(top_builddir)/lib/cpp/libthrift.la
Roger Meierd3b9dca2011-06-24 14:01:10 +000081
82StressTestNonBlocking_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020083 src/StressTestNonBlocking.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000084
85StressTestNonBlocking_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020086 libstresstestgencpp.la \
87 $(top_builddir)/lib/cpp/libthriftnb.la \
88 -levent
Roger Meierd3b9dca2011-06-24 14:01:10 +000089#
90# Common thrift code generation rules
91#
92THRIFT = $(top_builddir)/compiler/cpp/thrift
93
94gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020095 $(THRIFT) --gen cpp:templates,cob_style -r $<
Roger Meierd3b9dca2011-06-24 14:01:10 +000096
Roger Meiera5bf1a12014-10-22 23:26:01 +020097gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020098 $(THRIFT) --gen cpp $<
Roger Meierd3b9dca2011-06-24 14:01:10 +000099
Konrad Grochowski1ff4a972014-09-19 23:57:57 +0200100AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp
Roger Meierec300e32014-10-13 02:13:35 +0200101AM_CXXFLAGS = -Wall -Wextra -pedantic
Roger Meier3faaedf2011-10-02 10:51:45 +0000102AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS)
Roger Meierd3b9dca2011-06-24 14:01:10 +0000103
104clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +0200105 $(RM) -r gen-cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +0000106
107EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200108 src/TestClient.cpp \
109 src/TestServer.cpp \
110 src/StressTest.cpp \
111 src/StressTestNonBlocking.cpp \
112 realloc/realloc_test.c \
113 realloc/Makefile