Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / test / legacy / CMakeLists.txt
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
18 foreach(_name
19   channel
20   pixel
21   pixel_iterator)
22   set(_test t_legacy_${_name})
23   set(_target test_legacy_${_name})
24
25   add_executable(${_target} "")
26   target_sources(${_target} PRIVATE ${_name}.cpp error_if.cpp)
27   target_link_libraries(${_target}
28     PRIVATE
29       gil_compile_options
30       gil_include_directories
31       gil_dependencies)
32   target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK)
33   add_test(NAME ${_test} COMMAND ${_target})
34
35   unset(_name)
36   unset(_target)
37   unset(_test)
38 endforeach()
39
40 # Add extra source files accompanying image.cpp
41 foreach(_name
42   image)
43   set(_test t_legacy_${_name})
44   set(_target test_legacy_${_name})
45
46   add_executable(${_target} "")
47   target_sources(${_target} PRIVATE
48     ${_name}.cpp
49     error_if.cpp
50     sample_image.cpp)
51
52   target_link_libraries(${_target}
53     PRIVATE
54       gil_compile_options
55       gil_include_directories
56       gil_dependencies)
57   target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK)
58   add_test(NAME ${_test} COMMAND ${_target}
59     ${CMAKE_CURRENT_SOURCE_DIR}/gil_reference_checksums.txt)
60
61   unset(_name)
62   unset(_target)
63   unset(_test)
64 endforeach()