summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthieu Darbois <mayeut@users.noreply.github.com>2016-07-14 11:06:26 +0200
committerGitHub <noreply@github.com>2016-07-14 11:06:26 +0200
commitb8bd1b0e07cf427b80eb0dc6823efebbdd1b8e5b (patch)
treeca702e04793729749ccc1a094270e1b6ea13c86b /tests
parente40c28c2e89c30ebb682fe2fabef10930e039c1f (diff)
Add compilation test for standalone inclusion of openjpeg.h (#798)
This ensures all openjpeg.h dependencies are met. Fix #673
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/include_openjpeg.c9
2 files changed, 11 insertions, 0 deletions
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 <openjpeg.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc;
+ (void)argv;
+
+ return 0;
+}