[cpp-xmltooling] 04/05: Compile the source data directory into the test binary

Scott Cantor cantor.2 at osu.edu
Tue Jun 26 18:33:53 EDT 2018


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

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

View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=24999e0f57d4ab0266e20f8d1e87b65a3f1e74df

commit 24999e0f57d4ab0266e20f8d1e87b65a3f1e74df
Author: Ferenc Wágner <wferi at debian.org>
AuthorDate: Mon Jun 25 21:01:00 2018 +0200

    Compile the source data directory into the test binary
    
    This makes a difference for out of tree (VPATH) builds, avoiding the
    need to provide the XMLTOOLINGTEST_DATA environment variable.
---
 xmltoolingtest/Makefile.am      | 2 +-
 xmltoolingtest/xmltoolingtest.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xmltoolingtest/Makefile.am b/xmltoolingtest/Makefile.am
index 6607fc2..3070d5a 100644
--- a/xmltoolingtest/Makefile.am
+++ b/xmltoolingtest/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DDATADIR=\"$(srcdir)/data/\"
 
 TESTS = xmltoolingtest
 
diff --git a/xmltoolingtest/xmltoolingtest.h b/xmltoolingtest/xmltoolingtest.h
index 47a7fdd..9457802 100644
--- a/xmltoolingtest/xmltoolingtest.h
+++ b/xmltoolingtest/xmltoolingtest.h
@@ -27,7 +27,7 @@
 
 //#define XMLTOOLINGTEST_LEAKCHECK
 
-std::string data_path = "../xmltoolingtest/data/";
+std::string data_path = DATADIR;
 
 class ToolingFixture : public CxxTest::GlobalFixture
 {

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


More information about the commits mailing list