Imported Upstream version 1.71.0
[platform/upstream/boost.git] / libs / gil / io / test / CMakeLists.txt
1 #
2 # Copyright (c) 2017 Mateusz Loskot <mateusz at loskot dot net>
3 # All rights reserved.
4 #
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or copy at
7 # http://www.boost.org/LICENSE_1_0.txt)
8 #
9 message(STATUS "Boost.GIL: Configuring IO extension tests")
10
11 set(_formats
12   bmp
13   jpeg
14   png
15   pnm
16   simple
17   targa
18   tiff)
19
20 if(GIL_ENABLE_EXT_IO_RAW)
21   list(APPEND _formats raw)
22 endif()
23
24 foreach(_name ${_formats})
25   set(_target test_ext_io_${_name})
26
27   add_executable(${_target} "")
28   target_link_libraries(${_target}
29     PRIVATE
30       gil_compile_options
31       gil_include_directories
32       gil_dependencies)
33   target_compile_definitions(${_target}
34     PRIVATE
35       BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
36       BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES)
37   add_test(test.ext.io.${_name} ${_target})
38
39   unset(_name)
40   unset(_target)
41 endforeach()
42
43 unset(_formats)
44
45 target_sources(test_ext_io_simple
46   PRIVATE
47     all_formats_test.cpp)
48
49 target_sources(test_ext_io_bmp
50   PRIVATE
51     bmp_old_test.cpp bmp_read_test.cpp bmp_test.cpp bmp_write_test.cpp)
52
53 target_sources(test_ext_io_jpeg
54   PRIVATE
55     jpeg_test.cpp jpeg_old_test.cpp jpeg_read_test.cpp jpeg_write_test.cpp)
56
57 target_sources(test_ext_io_png
58   PRIVATE
59     png_test.cpp png_old_test.cpp png_file_format_test.cpp png_read_test.cpp)
60
61 target_sources(test_ext_io_pnm
62   PRIVATE
63     pnm_test.cpp pnm_old_test.cpp pnm_read_test.cpp pnm_write_test.cpp)
64
65 if(GIL_ENABLE_EXT_IO_RAW)
66   target_sources(test_ext_io_raw
67     PRIVATE
68       raw_test.cpp)
69 endif()
70
71 target_sources(test_ext_io_targa
72   PRIVATE
73     targa_test.cpp targa_old_test.cpp targa_read_test.cpp targa_write_test.cpp)
74
75 target_sources(test_ext_io_tiff
76   PRIVATE
77     tiff_file_format_test.cpp
78     tiff_old_test.cpp
79     tiff_subimage_test.cpp
80     tiff_test.cpp
81     tiff_tiled_float_test.cpp
82     tiff_tiled_minisblack_test_1-10.cpp
83     tiff_tiled_minisblack_test_11-20.cpp
84     tiff_tiled_minisblack_test_21-31_32-64.cpp
85     tiff_tiled_minisblack_write_test_1-10.cpp
86     tiff_tiled_minisblack_write_test_11-20.cpp
87     tiff_tiled_minisblack_write_test_21-31_32-64.cpp
88     tiff_tiled_palette_test_1-8.cpp
89     tiff_tiled_palette_test_8-16.cpp
90     tiff_tiled_palette_write_test_1-8.cpp
91     tiff_tiled_palette_write_test_8-16.cpp
92     tiff_tiled_rgb_contig_test_1-10.cpp
93     tiff_tiled_rgb_contig_test_11-20.cpp
94     tiff_tiled_rgb_contig_test_21-31_32_64.cpp
95     tiff_tiled_rgb_contig_write_test_1-10.cpp
96     tiff_tiled_rgb_contig_write_test_11-20.cpp
97     tiff_tiled_rgb_contig_write_test_21-31_32_64.cpp
98     tiff_tiled_rgb_planar_test_1-10.cpp
99     tiff_tiled_rgb_planar_test_11-20.cpp
100     tiff_tiled_rgb_planar_test_21-31_32_64.cpp
101     tiff_tiled_test.cpp
102     tiff_write_test.cpp)