]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # Copyright Louis Dionne 2013-2016 |
2 | # Distributed under the Boost Software License, Version 1.0. | |
3 | # (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | |
4 | ||
5 | # Setup custom functions, master targets and file lists for the unit tests | |
6 | add_custom_target(experimental COMMENT "Build all the experimental code.") | |
7 | add_dependencies(check experimental) | |
8 | ||
9 | # Add all the experimental targets | |
10 | file(GLOB_RECURSE BOOST_HANA_EXPERIMENTAL_SOURCES "*.cpp") | |
11 | ||
12 | # GCC fails to link strong_datatypes.cpp due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70095 | |
13 | if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") | |
14 | list(APPEND EXCLUDED_EXPERIMENTAL "strong_datatypes.cpp") | |
15 | endif() | |
16 | ||
17 | file(GLOB_RECURSE EXCLUDED_EXPERIMENTAL ${EXCLUDED_EXPERIMENTAL}) | |
18 | list(REMOVE_ITEM BOOST_HANA_EXPERIMENTAL_SOURCES "" ${EXCLUDED_EXPERIMENTAL}) | |
19 | ||
20 | foreach(file IN LISTS BOOST_HANA_EXPERIMENTAL_SOURCES) | |
21 | boost_hana_target_name_for(target "${file}") | |
22 | add_executable(${target} EXCLUDE_FROM_ALL ${file}) | |
23 | target_link_libraries(${target} hana) | |
24 | boost_hana_add_test(${target} ${CMAKE_CURRENT_BINARY_DIR}/${target}) | |
25 | add_dependencies(experimental ${target}) | |
26 | endforeach() |