Merge lp:~jpakkane/evemu/compiletest into lp:evemu

Proposed by Jussi Pakkanen
Status: Merged
Merged at revision: 47
Proposed branch: lp:~jpakkane/evemu/compiletest
Merge into: lp:evemu
Diff against target: 96 lines (+47/-2)
5 files modified
Makefile.am (+1/-1)
configure.ac (+3/-1)
test/Makefile.am (+9/-0)
test/test-c-compile.c (+17/-0)
test/test-cxx-compile.cpp (+17/-0)
To merge this branch: bzr merge lp:~jpakkane/evemu/compiletest
Reviewer Review Type Date Requested Status
Chase Douglas (community) Approve
Review via email: mp+95932@code.launchpad.net

Description of the change

Test that compiling and linking works with C and C++ compilers.

To post a comment you must log in.
Revision history for this message
Chase Douglas (chasedouglas) wrote :

Looks good other than the hyphen vs underscore naming issue. After that is fixed I approve for merging :).

review: Approve
lp:~jpakkane/evemu/compiletest updated
48. By Jussi Pakkanen

Changed underscores to hyphens.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2011-11-30 20:11:37 +0000
3+++ Makefile.am 2012-03-06 08:34:17 +0000
4@@ -1,4 +1,4 @@
5-SUBDIRS = src tools python
6+SUBDIRS = src tools python test
7
8 pkgconfigdir = $(libdir)/pkgconfig
9 pkgconfig_DATA = utouch-evemu.pc
10
11=== modified file 'configure.ac'
12--- configure.ac 2011-12-01 03:27:16 +0000
13+++ configure.ac 2012-03-06 08:34:17 +0000
14@@ -11,7 +11,7 @@
15 # Initialize Automake
16 AM_INIT_AUTOMAKE([foreign dist-bzip2])
17 AM_SILENT_RULES([yes])
18-AM_MAINTAINER_MODE
19+AM_MAINTAINER_MODE([enable])
20
21 LIB_VERSION=1:0:0
22 AC_SUBST([LIB_VERSION])
23@@ -21,6 +21,7 @@
24
25 # Checks for programs.
26 AC_PROG_CC
27+AC_PROG_CXX
28 AC_PROG_INSTALL
29 AM_PATH_PYTHON([2.6])
30
31@@ -42,5 +43,6 @@
32 src/Makefile
33 python/Makefile
34 tools/Makefile
35+ test/Makefile
36 utouch-evemu.pc])
37 AC_OUTPUT
38
39=== added directory 'test'
40=== added file 'test/Makefile.am'
41--- test/Makefile.am 1970-01-01 00:00:00 +0000
42+++ test/Makefile.am 2012-03-06 08:34:17 +0000
43@@ -0,0 +1,9 @@
44+TESTS = test-c-compile test-cxx-compile
45+
46+check_PROGRAMS = $(TESTS)
47+
48+test_c_compile_SOURCES = test-c-compile.c
49+test_c_compile_LDADD = $(top_builddir)/src/libutouch-evemu.la
50+
51+test_cxx_compile_SOURCES = test-cxx-compile.cpp
52+test_cxx_compile_LDADD = $(top_builddir)/src/libutouch-evemu.la
53
54=== added file 'test/test-c-compile.c'
55--- test/test-c-compile.c 1970-01-01 00:00:00 +0000
56+++ test/test-c-compile.c 2012-03-06 08:34:17 +0000
57@@ -0,0 +1,17 @@
58+/*
59+ * Test that compiling+linking works with a C compiler.
60+ */
61+
62+#include <stdio.h>
63+#include <evemu.h>
64+
65+#define UNUSED __attribute__((unused))
66+
67+int main(int argc UNUSED, char **argv UNUSED) {
68+ struct evemu_device *dummy = evemu_new("dummy");
69+ if(!dummy) {
70+ printf("This should really not be happening.\n");
71+ return 1;
72+ }
73+ return 0;
74+}
75
76=== added file 'test/test-cxx-compile.cpp'
77--- test/test-cxx-compile.cpp 1970-01-01 00:00:00 +0000
78+++ test/test-cxx-compile.cpp 2012-03-06 08:34:17 +0000
79@@ -0,0 +1,17 @@
80+/*
81+ * Test that compiling+linking works with a C++ compiler.
82+ */
83+
84+#include <stdio.h>
85+#include <evemu.h>
86+
87+#define UNUSED __attribute__((unused))
88+
89+int main(int argc UNUSED, char **argv UNUSED) {
90+ struct evemu_device *dummy = evemu_new("dummy");
91+ if(!dummy) {
92+ printf("This should really not be happening.\n");
93+ return 1;
94+ }
95+ return 0;
96+}

Subscribers

People subscribed via source and target branches