Commit c513b5e3 by Eric Cousineau Committed by GitHub

tests(CMakeLists): robustify against add'l versions of Boost (#2608)

* tests/CMakeLists: Robustify against add'l versions of Boost

* refactor: simpler impl

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
parent 0b9acc40
...@@ -226,12 +226,12 @@ find_package(Boost 1.56) ...@@ -226,12 +226,12 @@ find_package(Boost 1.56)
if(Boost_FOUND) if(Boost_FOUND)
if(NOT TARGET Boost::headers) if(NOT TARGET Boost::headers)
add_library(Boost::headers IMPORTED INTERFACE)
if(TARGET Boost::boost) if(TARGET Boost::boost)
# Classic FindBoost # Classic FindBoost
add_library(Boost::headers ALIAS Boost::boost) set_property(TARGET Boost::boost PROPERTY INTERFACE_LINK_LIBRARIES Boost::boost)
else() else()
# Very old FindBoost, or newer Boost than CMake in older CMakes # Very old FindBoost, or newer Boost than CMake in older CMakes
add_library(Boost::headers IMPORTED INTERFACE)
set_property(TARGET Boost::headers PROPERTY INTERFACE_INCLUDE_DIRECTORIES set_property(TARGET Boost::headers PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${Boost_INCLUDE_DIRS}) ${Boost_INCLUDE_DIRS})
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment