CMakeLists.txt 1009 B

123456789101112131415161718192021222324252627
  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. # TODO: Also process literate tests
  8. file(GLOB test_files *.cpp)
  9. # remove some test for which the dependencies are not yet available or have special requirements
  10. # TODO: enable more tests
  11. list(FILTER test_files EXCLUDE REGEX
  12. efficiency|deduced_unmatched_arg|python_test|duplicates)
  13. foreach(file IN LISTS test_files)
  14. get_filename_component(core_name ${file} NAME_WE)
  15. set(test_name test_boost_parameter_${core_name})
  16. add_executable(${test_name} ${file})
  17. # add Boost.Parameter and any libraries that are only needed by the tests (none at the moment)
  18. target_link_libraries(${test_name} Boost::parameter)
  19. add_test(NAME ${test_name} COMMAND ${test_name})
  20. endforeach()