Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / test / extension / io / 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 tests in test/extension/io")
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(_test t_ext_io_${_name})
26   set(_target test_ext_io_${_name})
27
28   add_executable(${_target} "")
29   target_link_libraries(${_target}
30     PRIVATE
31       gil_compile_options
32       gil_include_directories
33       gil_dependencies)
34   target_compile_definitions(${_target}
35     PRIVATE
36       BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
37       BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES)
38   add_test(NAME ${_test} COMMAND ${_target})
39
40   unset(_name)
41   unset(_target)
42   unset(_test)
43 endforeach()
44
45 unset(_formats)
46
47 target_sources(test_ext_io_simple
48   PRIVATE
49     all_formats_test.cpp)
50
51 target_sources(test_ext_io_bmp
52   PRIVATE
53     bmp_old_test.cpp bmp_read_test.cpp bmp_test.cpp bmp_write_test.cpp)
54
55 target_sources(test_ext_io_jpeg
56   PRIVATE
57     jpeg_test.cpp jpeg_old_test.cpp jpeg_read_test.cpp jpeg_write_test.cpp)
58
59 target_sources(test_ext_io_png
60   PRIVATE
61     png_test.cpp png_old_test.cpp png_file_format_test.cpp png_read_test.cpp)
62
63 target_sources(test_ext_io_pnm
64   PRIVATE
65     pnm_test.cpp pnm_old_test.cpp pnm_read_test.cpp pnm_write_test.cpp)
66
67 if(GIL_ENABLE_EXT_IO_RAW)
68   target_sources(test_ext_io_raw
69     PRIVATE
70       raw_test.cpp)
71 endif()
72
73 target_sources(test_ext_io_targa
74   PRIVATE
75     targa_test.cpp targa_old_test.cpp targa_read_test.cpp targa_write_test.cpp)
76
77 target_sources(test_ext_io_tiff
78   PRIVATE
79     tiff_file_format_test.cpp
80     tiff_old_test.cpp
81     tiff_subimage_test.cpp
82     tiff_test.cpp
83     tiff_tiled_float_test.cpp
84     tiff_tiled_minisblack_test_1-10.cpp
85     tiff_tiled_minisblack_test_11-20.cpp
86     tiff_tiled_minisblack_test_21-31_32-64.cpp
87     tiff_tiled_minisblack_write_test_1-10.cpp
88     tiff_tiled_minisblack_write_test_11-20.cpp
89     tiff_tiled_minisblack_write_test_21-31_32-64.cpp
90     tiff_tiled_palette_test_1-8.cpp
91     tiff_tiled_palette_test_8-16.cpp
92     tiff_tiled_palette_write_test_1-8.cpp
93     tiff_tiled_palette_write_test_8-16.cpp
94     tiff_tiled_rgb_contig_test_1-10.cpp
95     tiff_tiled_rgb_contig_test_11-20.cpp
96     tiff_tiled_rgb_contig_test_21-31_32_64.cpp
97     tiff_tiled_rgb_contig_write_test_1-10.cpp
98     tiff_tiled_rgb_contig_write_test_11-20.cpp
99     tiff_tiled_rgb_contig_write_test_21-31_32_64.cpp
100     tiff_tiled_rgb_planar_test_1-10.cpp
101     tiff_tiled_rgb_planar_test_11-20.cpp
102     tiff_tiled_rgb_planar_test_21-31_32_64.cpp
103     tiff_tiled_test.cpp
104     tiff_write_test.cpp)