From b8bd1b0e07cf427b80eb0dc6823efebbdd1b8e5b Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Thu, 14 Jul 2016 11:06:26 +0200 Subject: [PATCH] Add compilation test for standalone inclusion of openjpeg.h (#798) This ensures all openjpeg.h dependencies are met. Fix #673 --- tests/CMakeLists.txt | 2 ++ tests/include_openjpeg.c | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/include_openjpeg.c diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ee39de8e..7b107d72 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -80,6 +80,8 @@ set_property(TEST rta4 APPEND PROPERTY DEPENDS tte4) add_test(NAME rta5 COMMAND j2k_random_tile_access tte5.j2k) set_property(TEST rta5 APPEND PROPERTY DEPENDS tte5) +add_executable(include_openjpeg include_openjpeg.c) + # No image send to the dashboard if lib PNG is not available. if(NOT OPJ_HAVE_LIBPNG) message(WARNING "Lib PNG seems to be not available: if you want run the non-regression tests with images reported to the dashboard, you need it (try BUILD_THIRDPARTY)") diff --git a/tests/include_openjpeg.c b/tests/include_openjpeg.c new file mode 100644 index 00000000..aa13fb3b --- /dev/null +++ b/tests/include_openjpeg.c @@ -0,0 +1,9 @@ +#include + +int main(int argc, char **argv) +{ + (void)argc; + (void)argv; + + return 0; +}