[cpp-log4shib] 08/17: Let tests/sscpp706 find its data in VPATH builds as well

Scott Cantor cantor.2 at osu.edu
Mon Jun 25 10:18:19 EDT 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-log4shib.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-log4shib.git;a=commit;h=17a853415f4979a897beaf1b0c4ab483715b13f0

commit 17a853415f4979a897beaf1b0c4ab483715b13f0
Author: Ferenc Wágner <wferi at debian.org>
AuthorDate: Mon Jun 25 01:21:04 2018 +0200

    Let tests/sscpp706 find its data in VPATH builds as well
---
 tests/Makefile.am  | 1 +
 tests/sscpp706.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1da1861..fd19f3e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -12,6 +12,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
 LDADD = ../src/liblog4shib.la
 AM_DEFAULT_SOURCE_EXT = .cpp
 
+sscpp706_CPPFLAGS = $(AM_CPPFLAGS) -DDATADIR=\"$(srcdir)\"
 
 testbench_SOURCES = Clock.cpp Clock.hh testbench.cpp 
 
diff --git a/tests/sscpp706.cpp b/tests/sscpp706.cpp
index 42e7321..7ab32d4 100644
--- a/tests/sscpp706.cpp
+++ b/tests/sscpp706.cpp
@@ -5,7 +5,7 @@
 
 int main(int argc, char* argv[])
 {
-    std::string initFileName = argc > 1 ? argv[1] : "sscpp706.txt";
+    std::string initFileName = argc > 1 ? argv[1] : DATADIR "/sscpp706.txt";
     try {
         log4shib::PropertyConfigurator::configure(initFileName);
         log4shib::Category& root = log4shib::Category::getRoot();

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list