• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2018, 2019 Peter Dimov
2# Distributed under the Boost Software License, Version 1.0.
3# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
4
5include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
6
7if(NOT HAVE_BOOST_TEST)
8  return()
9endif()
10
11enable_language(C)
12
13set(tests_common arithmetic array comparison control debug facilities list logical punctuation selection seq slot stringize tuple variadic isempty)
14set(tests_c ${tests_common})
15set(tests_cpp ${tests_common} iteration repetition quick)
16
17set(BOOST_TEST_LINK_LIBRARIES Boost::preprocessor)
18
19include_directories(../../..) # for `include <libs/preprocessor/...>` to work
20
21foreach(test IN LISTS tests_c)
22
23  boost_test(TYPE compile SOURCES ${test}.c)
24  boost_test(TYPE compile NAME ${test}_c_nvm SOURCES ${test}.c COMPILE_DEFINITIONS BOOST_PP_VARIADICS=0)
25
26endforeach()
27
28foreach(test IN LISTS tests_cpp)
29
30  boost_test(TYPE compile SOURCES ${test}.cpp)
31  boost_test(TYPE compile NAME ${test}_cpp_nvm SOURCES ${test}.cpp COMPILE_DEFINITIONS BOOST_PP_VARIADICS=0)
32
33endforeach()
34