Skip to content

Commit

Permalink
Do not build boost.hana example with "old" gcc versions
Browse files Browse the repository at this point in the history
  • Loading branch information
manusharded committed Aug 27, 2018
1 parent e0b0b04 commit 6248846
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ add_tinyrefl_example(tinyrefl-example api.cpp)
target_link_libraries(tinyrefl-example PRIVATE tinyrefl-example-lib)

if(Boost_FOUND)
add_tinyrefl_example(tinyrefl-boost-hana-example boost_hana.cpp)
if((CMAKE_CXX_COMPILER_ID STREQUAL GNU) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0.0))
message(WARNING "Versions of GCC prior to 6.0.0 are not supported by Boost.Hana. The example will not be built")
else()
add_tinyrefl_example(tinyrefl-boost-hana-example boost_hana.cpp)
target_link_libraries(tinyrefl-boost-hana-example PRIVATE tinyrefl-example-lib)
target_include_directories(tinyrefl-boost-hana-example PRIVATE ${Boost_INCLUDE_DIRS})
endif()

add_tinyrefl_example(tinyrefl-boost-fusion-example boost_fusion.cpp)
target_link_libraries(tinyrefl-boost-hana-example PRIVATE tinyrefl-example-lib)
target_link_libraries(tinyrefl-boost-fusion-example PRIVATE tinyrefl-example-lib)
target_include_directories(tinyrefl-boost-hana-example PRIVATE ${Boost_INCLUDE_DIRS})
target_include_directories(tinyrefl-boost-fusion-example PRIVATE ${Boost_INCLUDE_DIRS})
else()
message(WARNING "Boost not found, boost example will not be build")
message(WARNING "Boost not found, boost example will not be built")
endif()

add_tinyrefl_example(tinyrefl-rttr-example rttr.cpp)
Expand Down

0 comments on commit 6248846

Please sign in to comment.