https://issues.shibboleth.net/jira/browse/CPPXT-77
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / Makefile.am
1 AUTOMAKE_OPTIONS = foreign
2
3 if BUILD_UNITTEST
4
5 bin_PROGRAMS = xmltoolingtest
6 xmltoolingtest_CXXFLAGS = $(CXXTESTFLAGS)
7 if BUILD_XMLSEC
8 xmltoolingtest_LDFLAGS = $(XMLSEC_LIBS)
9 xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la
10 else
11 xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling-lite.la
12 endif
13
14 else
15
16 bin_PROGRAMS = 
17
18 endif
19
20 if BUILD_XMLSEC
21 xmlsec_sources = \
22     EncryptionTest.h \
23     FilesystemCredentialResolverTest.h \
24     InlineKeyResolverTest.h \
25     MemoryStorageServiceTest.h \
26     SecurityHelperTest.h \
27     SignatureTest.h
28 else
29 xmlsec_sources =
30 endif
31
32 xmltoolingtest_h = \
33     ComplexXMLObjectTest.h \
34     DateTimeTest.h \
35     ExceptionTest.h \
36     KeyInfoTest.h \
37     MarshallingTest.h \
38     NonVisibleNamespaceTest.h \
39     SOAPTest.h \
40     UnmarshallingTest.h \
41     TemplateEngineTest.h \
42     xmltoolingtest.h \
43     ${xmlsec_sources}
44
45 noinst_HEADERS = \
46     XMLObjectBaseTestCase.h
47
48 nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp)
49
50 CLEANFILES = $(nodist_xmltoolingtest_SOURCES)
51
52 do-cxxtestgen:
53         if test $(HFILE) = "xmltoolingtest.h"; then \
54                 $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
55         else \
56                 $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
57         fi;
58
59 $(nodist_xmltoolingtest_SOURCES): %.cpp: %.h
60         $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
61
62 EXTRA_DIST = xmltoolingtest.vcxproj xmltoolingtest.vcxproj.filters $(xmltoolingtest_h) data