Add compilation test for standalone inclusion of openjpeg.h (#798)
authorMatthieu Darbois <mayeut@users.noreply.github.com>
Thu, 14 Jul 2016 09:06:26 +0000 (11:06 +0200)
committerGitHub <noreply@github.com>
Thu, 14 Jul 2016 09:06:26 +0000 (11:06 +0200)
This ensures all openjpeg.h dependencies are met.
Fix #673

tests/CMakeLists.txt
tests/include_openjpeg.c [new file with mode: 0644]

index ee39de8e7c693184e209f16830518d10ca7a8656..7b107d729a9d99fafa363e13ab00f0f20a9369b0 100644 (file)
@@ -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 (file)
index 0000000..aa13fb3
--- /dev/null
@@ -0,0 +1,9 @@
+#include <openjpeg.h>
+
+int main(int argc, char **argv)
+{
+       (void)argc;
+       (void)argv;
+       
+       return 0;
+}