summaryrefslogtreecommitdiff
path: root/tests/test_pretty_print.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-02-02 23:44:25 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-02-02 23:44:25 (GMT)
commit1a545b75f6bd05a0eca42e1f797aa4853aca88d6 (patch)
tree40e76f10e64cfddf64123b677e5d15152e09bdb9 /tests/test_pretty_print.cc
parenteb30d42b5dd3ed5bb37336ed46a59eabaca81e06 (diff)
workaround cmake 2.8.10 not allowing CTEST_CUSTOM_POST_TEST arguments
Diffstat (limited to 'tests/test_pretty_print.cc')
-rw-r--r--tests/test_pretty_print.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/test_pretty_print.cc b/tests/test_pretty_print.cc
new file mode 100644
index 0000000..b400e21
--- /dev/null
+++ b/tests/test_pretty_print.cc
@@ -0,0 +1,22 @@
+/* Workaround for CTEST_CUSTOM_POST_TEST not allowing arguments
+ compile with
+ -DPYBIN=/usr/bin/python
+ -DPYSRC=/home/janedoe/openscad/tests/test_pretty_print.py
+ -DBUILDDIR=--builddir=/home/janedoe/openscad/tests/bin"
+*/
+
+#include <unistd.h>
+
+#define PREQUOTE(x) #x
+#define QUOTE(x) PREQUOTE(x)
+int main( int argc, char * argv[] )
+{
+ char *newargs[4];
+ newargs[0] = const_cast<char *>(QUOTE( PYBIN ));
+ newargs[1] = const_cast<char *>(QUOTE( PYSRC ));
+ newargs[2] = const_cast<char *>(QUOTE( BUILDDIR ));
+ newargs[3] = NULL;
+ return execv( newargs[0], newargs );
+}
+
+
contact: Jan Huwald // Impressum