2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-20 14:52:11 +00:00

CMake: Automatically discover unit tests and examples.

This commit is contained in:
Louis Dionne
2014-06-25 23:35:56 -04:00
parent 52eead977e
commit 65796aeb6e
2 changed files with 16 additions and 255 deletions

View File

@@ -12,98 +12,12 @@ function(boost_hana_add_example name)
add_dependencies(examples example.${name})
endfunction()
boost_hana_add_example(core.convert)
boost_hana_add_example(core.is_a)
boost_hana_add_example(core.typeclass)
boost_hana_add_example(functional.always.basic)
boost_hana_add_example(functional.always.dependent)
boost_hana_add_example(functional.apply)
boost_hana_add_example(functional.arg)
boost_hana_add_example(functional.compose)
boost_hana_add_example(functional.curry)
boost_hana_add_example(functional.demux)
boost_hana_add_example(functional.fix)
boost_hana_add_example(functional.flip)
boost_hana_add_example(functional.id)
boost_hana_add_example(functional.lockstep)
boost_hana_add_example(functional.on)
boost_hana_add_example(functional.partial)
boost_hana_add_example(functional.placeholder)
boost_hana_add_example(integral.comparable)
boost_hana_add_example(integral.literals)
boost_hana_add_example(integral.logical.and)
boost_hana_add_example(integral.logical.eval_if)
boost_hana_add_example(integral.logical.or)
boost_hana_add_example(integral.operators)
boost_hana_add_example(list.applicative.overview)
boost_hana_add_example(list.comparable)
boost_hana_add_example(list.concat)
boost_hana_add_example(list.cons)
boost_hana_add_example(list.filter)
boost_hana_add_example(list.foldable.all)
boost_hana_add_example(list.foldable.any)
boost_hana_add_example(list.foldable.count)
boost_hana_add_example(list.foldable.elem)
boost_hana_add_example(list.foldable.find)
boost_hana_add_example(list.foldable.foldl)
boost_hana_add_example(list.foldable.foldl1)
boost_hana_add_example(list.foldable.foldr)
boost_hana_add_example(list.foldable.foldr1)
boost_hana_add_example(list.foldable.length)
boost_hana_add_example(list.foldable.minimum)
boost_hana_add_example(list.foldable.minimum_by)
boost_hana_add_example(list.foldable.none)
boost_hana_add_example(list.foldable.unpack)
boost_hana_add_example(list.functor.adjust)
boost_hana_add_example(list.functor.fill)
boost_hana_add_example(list.functor.fmap)
boost_hana_add_example(list.functor.replace)
boost_hana_add_example(list.init)
boost_hana_add_example(list.iterable.at)
boost_hana_add_example(list.iterable.drop)
boost_hana_add_example(list.iterable.overview)
boost_hana_add_example(list.list_c)
boost_hana_add_example(list.list_t)
boost_hana_add_example(list.monad.overview)
boost_hana_add_example(list.partition)
boost_hana_add_example(list.permutations)
boost_hana_add_example(list.reverse)
boost_hana_add_example(list.snoc)
boost_hana_add_example(list.sort)
boost_hana_add_example(list.sort_by)
boost_hana_add_example(list.take)
boost_hana_add_example(list.take_until)
boost_hana_add_example(list.take_while)
boost_hana_add_example(list.to)
boost_hana_add_example(list.zip)
boost_hana_add_example(list.zip_with)
boost_hana_add_example(logical.default_instance.eval_if)
boost_hana_add_example(maybe.api)
boost_hana_add_example(maybe.applicative)
boost_hana_add_example(maybe.comparable)
boost_hana_add_example(maybe.functor)
boost_hana_add_example(maybe.monad)
boost_hana_add_example(pair.comparable)
boost_hana_add_example(range.foldable.lazy_foldl)
boost_hana_add_example(range.foldable.lazy_foldr)
boost_hana_add_example(range.foldable.product)
boost_hana_add_example(range.iterable.drop_while)
boost_hana_add_example(range.iterable.overview)
boost_hana_add_example(range.range)
boost_hana_add_example(type.comparable)
boost_hana_add_example(type.construct)
boost_hana_add_example(type.decltype)
boost_hana_add_example(type.initializer_list)
boost_hana_add_example(type.sizeof)
boost_hana_add_example(type.template)
boost_hana_add_example(type.trait)
boost_hana_add_example(type.trait_)
boost_hana_add_example(type.untype)
file(GLOB_RECURSE BOOST_HANA_EXAMPLE_SOURCES
RELATIVE ${CMAKE_CURRENT_LIST_DIR}
"*.cpp")
foreach(file IN LISTS BOOST_HANA_EXAMPLE_SOURCES)
string(REGEX REPLACE "\\.cpp$" "" name ${file})
string(REGEX REPLACE "/" "." name ${name})
boost_hana_add_example(${name})
endforeach()