CMakeLists.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  2. # Copyright (c) 2019 Mateusz Loskot <mateusz at loskot dot net>
  3. #
  4. # Distributed under the Boost Software License, Version 1.0.
  5. # (See accompanying file LICENSE_1_0.txt or copy at
  6. # http://www.boost.org/LICENSE_1_0.txt)
  7. #
  8. # *** IMPORTANT MAINTENANCE RULES ***
  9. # These are GIL's original, comprehensive, all-in-one test suites.
  10. # * Keep as reference.
  11. # * Do NOT extend.
  12. # * Do NOT refactor.
  13. # * Modify only if absolutely necessary (a bug found in the tests).
  14. # See the accompanying README.md
  15. #
  16. message(STATUS "Boost.GIL: Configuring tests in test/legacy")
  17. foreach(_name
  18. channel
  19. pixel
  20. pixel_iterator)
  21. set(_test t_legacy_${_name})
  22. set(_target test_legacy_${_name})
  23. add_executable(${_target} "")
  24. target_sources(${_target} PRIVATE ${_name}.cpp error_if.cpp)
  25. target_link_libraries(${_target}
  26. PRIVATE
  27. gil_compile_options
  28. gil_include_directories
  29. gil_dependencies)
  30. target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK)
  31. add_test(NAME ${_test} COMMAND ${_target})
  32. unset(_name)
  33. unset(_target)
  34. unset(_test)
  35. endforeach()
  36. # Add extra source files accompanying image.cpp
  37. foreach(_name
  38. image)
  39. set(_test t_legacy_${_name})
  40. set(_target test_legacy_${_name})
  41. add_executable(${_target} "")
  42. target_sources(${_target} PRIVATE
  43. ${_name}.cpp
  44. error_if.cpp
  45. sample_image.cpp)
  46. target_link_libraries(${_target}
  47. PRIVATE
  48. gil_compile_options
  49. gil_include_directories
  50. gil_dependencies)
  51. target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK)
  52. add_test(NAME ${_test} COMMAND ${_target}
  53. ${CMAKE_CURRENT_SOURCE_DIR}/gil_reference_checksums.txt)
  54. unset(_name)
  55. unset(_target)
  56. unset(_test)
  57. endforeach()