diff options
author | Hans Ulrich Niedermann <gp@n-dimensional.de> | 2006-10-03 13:33:43 +0000 |
---|---|---|
committer | Hans Ulrich Niedermann <gp@n-dimensional.de> | 2006-10-03 13:33:43 +0000 |
commit | ccf2a1ab38d3749ec81cd9648bf7b9fb520b0f7b (patch) | |
tree | 5cb627266a4fe9b013fd3a102c9f75f9c5836fc3 /tests | |
parent | c56e6ed9e283271460577f78b2d15cb84fa61816 (diff) | |
download | libgphoto2-ccf2a1ab38d3749ec81cd9648bf7b9fb520b0f7b.tar.gz |
add pedantic compilation test cases
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9250 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 29 | ||||
-rw-r--r-- | tests/test-pedantic-compilation.c | 6 | ||||
-rw-r--r-- | tests/test-pedantic-compilation.cxx | 6 |
3 files changed, 40 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 1e50c59ca..1ad47f837 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,9 @@ SUBDIRS = ddb -check_PROGRAMS = test-camera-list +check_PROGRAMS = \ + test-camera-list \ + test-pedantic-c +# test-pedantic-cxx check_SCRIPTS = \ check-camera-list.sh @@ -39,4 +42,28 @@ test_camera_list_LDADD = \ $(LIBEXIF_LIBS) \ $(INTLLIBS) +if HAVE_GCC +PEDANTIC_CFLAGS = -std=c99 -pedantic -W -Wall -Wextra -Werror +PEDANTIC_CXXFLAGS = -std=c++98 -pedantic -W -Wall -Wextra -Werror +else +PEDANTIC_CFLAGS = +PEDANTIC_CXXFLAGS = +endif + +test_pedantic_c_SOURCES = test-pedantic-compilation.c +test_pedantic_c_CPPFLAGS = $(PEDANTIC_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) +test_pedantic_c_LDADD = \ + $(top_builddir)/libgphoto2/libgphoto2.la \ + $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \ + $(LIBEXIF_LIBS) \ + $(INTLLIBS) + +#test_pedantic_cxx_SOURCES = test-pedantic-compilation.cxx +#test_pedantic_cxx_CXXFLAGS = $(PEDANTIC_CXXFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) +#test_pedantic_cxx_LDADD = \ +# $(top_builddir)/libgphoto2/libgphoto2.la \ +# $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \ +# $(LIBEXIF_LIBS) \ +# $(INTLLIBS) + include $(top_srcdir)/installcheck.mk diff --git a/tests/test-pedantic-compilation.c b/tests/test-pedantic-compilation.c new file mode 100644 index 000000000..ff9675392 --- /dev/null +++ b/tests/test-pedantic-compilation.c @@ -0,0 +1,6 @@ +#include <gphoto2/gphoto2.h> + +int main() +{ + return 0; +} diff --git a/tests/test-pedantic-compilation.cxx b/tests/test-pedantic-compilation.cxx new file mode 100644 index 000000000..ff9675392 --- /dev/null +++ b/tests/test-pedantic-compilation.cxx @@ -0,0 +1,6 @@ +#include <gphoto2/gphoto2.h> + +int main() +{ + return 0; +} |