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
=== modified file 'Makefile.am'
--- Makefile.am 2011-11-30 20:11:37 +0000
+++ Makefile.am 2012-03-06 08:34:17 +0000
@@ -1,4 +1,4 @@
1SUBDIRS = src tools python1SUBDIRS = src tools python test
22
3pkgconfigdir = $(libdir)/pkgconfig3pkgconfigdir = $(libdir)/pkgconfig
4pkgconfig_DATA = utouch-evemu.pc4pkgconfig_DATA = utouch-evemu.pc
55
=== modified file 'configure.ac'
--- configure.ac 2011-12-01 03:27:16 +0000
+++ configure.ac 2012-03-06 08:34:17 +0000
@@ -11,7 +11,7 @@
11# Initialize Automake11# Initialize Automake
12AM_INIT_AUTOMAKE([foreign dist-bzip2])12AM_INIT_AUTOMAKE([foreign dist-bzip2])
13AM_SILENT_RULES([yes])13AM_SILENT_RULES([yes])
14AM_MAINTAINER_MODE14AM_MAINTAINER_MODE([enable])
1515
16LIB_VERSION=1:0:016LIB_VERSION=1:0:0
17AC_SUBST([LIB_VERSION])17AC_SUBST([LIB_VERSION])
@@ -21,6 +21,7 @@
2121
22# Checks for programs.22# Checks for programs.
23AC_PROG_CC23AC_PROG_CC
24AC_PROG_CXX
24AC_PROG_INSTALL25AC_PROG_INSTALL
25AM_PATH_PYTHON([2.6])26AM_PATH_PYTHON([2.6])
2627
@@ -42,5 +43,6 @@
42 src/Makefile43 src/Makefile
43 python/Makefile44 python/Makefile
44 tools/Makefile45 tools/Makefile
46 test/Makefile
45 utouch-evemu.pc])47 utouch-evemu.pc])
46AC_OUTPUT48AC_OUTPUT
4749
=== added directory 'test'
=== added file 'test/Makefile.am'
--- test/Makefile.am 1970-01-01 00:00:00 +0000
+++ test/Makefile.am 2012-03-06 08:34:17 +0000
@@ -0,0 +1,9 @@
1TESTS = test-c-compile test-cxx-compile
2
3check_PROGRAMS = $(TESTS)
4
5test_c_compile_SOURCES = test-c-compile.c
6test_c_compile_LDADD = $(top_builddir)/src/libutouch-evemu.la
7
8test_cxx_compile_SOURCES = test-cxx-compile.cpp
9test_cxx_compile_LDADD = $(top_builddir)/src/libutouch-evemu.la
010
=== added file 'test/test-c-compile.c'
--- test/test-c-compile.c 1970-01-01 00:00:00 +0000
+++ test/test-c-compile.c 2012-03-06 08:34:17 +0000
@@ -0,0 +1,17 @@
1/*
2 * Test that compiling+linking works with a C compiler.
3 */
4
5#include <stdio.h>
6#include <evemu.h>
7
8#define UNUSED __attribute__((unused))
9
10int main(int argc UNUSED, char **argv UNUSED) {
11 struct evemu_device *dummy = evemu_new("dummy");
12 if(!dummy) {
13 printf("This should really not be happening.\n");
14 return 1;
15 }
16 return 0;
17}
018
=== added file 'test/test-cxx-compile.cpp'
--- test/test-cxx-compile.cpp 1970-01-01 00:00:00 +0000
+++ test/test-cxx-compile.cpp 2012-03-06 08:34:17 +0000
@@ -0,0 +1,17 @@
1/*
2 * Test that compiling+linking works with a C++ compiler.
3 */
4
5#include <stdio.h>
6#include <evemu.h>
7
8#define UNUSED __attribute__((unused))
9
10int main(int argc UNUSED, char **argv UNUSED) {
11 struct evemu_device *dummy = evemu_new("dummy");
12 if(!dummy) {
13 printf("This should really not be happening.\n");
14 return 1;
15 }
16 return 0;
17}

Subscribers

People subscribed via source and target branches