CMakeLists.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. set(_formats
  11. bmp
  12. jpeg
  13. png
  14. pnm
  15. simple
  16. targa
  17. tiff)
  18. if(GIL_ENABLE_EXT_IO_RAW)
  19. list(APPEND _formats raw)
  20. endif()
  21. foreach(_name ${_formats})
  22. set(_test t_ext_io_${_name})
  23. set(_target test_ext_io_${_name})
  24. add_executable(${_target} "")
  25. target_link_libraries(${_target}
  26. PRIVATE
  27. gil_compile_options
  28. gil_include_directories
  29. gil_dependencies)
  30. target_compile_definitions(${_target}
  31. PRIVATE
  32. BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
  33. BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES)
  34. add_test(NAME ${_test} COMMAND ${_target})
  35. unset(_name)
  36. unset(_target)
  37. unset(_test)
  38. endforeach()
  39. unset(_formats)
  40. target_sources(test_ext_io_simple
  41. PRIVATE
  42. all_formats_test.cpp)
  43. target_sources(test_ext_io_bmp
  44. PRIVATE
  45. bmp_old_test.cpp bmp_read_test.cpp bmp_test.cpp bmp_write_test.cpp)
  46. target_sources(test_ext_io_jpeg
  47. PRIVATE
  48. jpeg_test.cpp jpeg_old_test.cpp jpeg_read_test.cpp jpeg_write_test.cpp)
  49. target_sources(test_ext_io_png
  50. PRIVATE
  51. png_test.cpp png_old_test.cpp png_file_format_test.cpp png_read_test.cpp)
  52. target_sources(test_ext_io_pnm
  53. PRIVATE
  54. pnm_test.cpp pnm_old_test.cpp pnm_read_test.cpp pnm_write_test.cpp)
  55. if(GIL_ENABLE_EXT_IO_RAW)
  56. target_sources(test_ext_io_raw
  57. PRIVATE
  58. raw_test.cpp)
  59. endif()
  60. target_sources(test_ext_io_targa
  61. PRIVATE
  62. targa_test.cpp targa_old_test.cpp targa_read_test.cpp targa_write_test.cpp)
  63. target_sources(test_ext_io_tiff
  64. PRIVATE
  65. tiff_file_format_test.cpp
  66. tiff_old_test.cpp
  67. tiff_subimage_test.cpp
  68. tiff_test.cpp
  69. tiff_tiled_float_test.cpp
  70. tiff_tiled_minisblack_test_1-10.cpp
  71. tiff_tiled_minisblack_test_11-20.cpp
  72. tiff_tiled_minisblack_test_21-31_32-64.cpp
  73. tiff_tiled_minisblack_write_test_1-10.cpp
  74. tiff_tiled_minisblack_write_test_11-20.cpp
  75. tiff_tiled_minisblack_write_test_21-31_32-64.cpp
  76. tiff_tiled_palette_test_1-8.cpp
  77. tiff_tiled_palette_test_8-16.cpp
  78. tiff_tiled_palette_write_test_1-8.cpp
  79. tiff_tiled_palette_write_test_8-16.cpp
  80. tiff_tiled_rgb_contig_test_1-10.cpp
  81. tiff_tiled_rgb_contig_test_11-20.cpp
  82. tiff_tiled_rgb_contig_test_21-31_32_64.cpp
  83. tiff_tiled_rgb_contig_write_test_1-10.cpp
  84. tiff_tiled_rgb_contig_write_test_11-20.cpp
  85. tiff_tiled_rgb_contig_write_test_21-31_32_64.cpp
  86. tiff_tiled_rgb_planar_test_1-10.cpp
  87. tiff_tiled_rgb_planar_test_11-20.cpp
  88. tiff_tiled_rgb_planar_test_21-31_32_64.cpp
  89. tiff_tiled_test.cpp
  90. tiff_write_test.cpp)