• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 Mike Dev
2# Distributed under the Boost Software License, Version 1.0.
3# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
4#
5# NOTE: CMake support for Boost.Parameter is currently experimental at best
6#       and the interface is likely to change in the future
7
8# TODO: Also process literate tests
9file(GLOB test_files *.cpp)
10
11# remove some test for which the dependencies are not yet available or have special requirements
12# TODO: enable more tests
13list(FILTER test_files EXCLUDE REGEX
14    efficiency|deduced_unmatched_arg|python_test|duplicates)
15
16foreach(file IN LISTS test_files)
17
18    get_filename_component(core_name ${file} NAME_WE)
19    set(test_name test_boost_parameter_${core_name})
20
21    add_executable(${test_name} ${file})
22    # add Boost.Parameter and any libraries that are only needed by the tests (none at the moment)
23    target_link_libraries(${test_name} Boost::parameter)
24
25    add_test(NAME ${test_name} COMMAND ${test_name})
26
27endforeach()