FindBoost: modernize documentation examples
I believe the examples in the documentation for the FindBoost script can be updated to use more modern features of CMake.
find_package(Boost 1.36.0)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(foo foo.cc)
endif()
The FindBoost script provides target Boost::headers nowadays. Perhaps using it is more idiomatic than doing include_directories command.
target_link_libraries(foo Boost::date_time Boost::filesystem
Boost::iostreams)
Although I can not find the confirmation explicitly stated in the documentation, I thought that the form of target_link_libraries without PRIVATE, PUBLIC or INTERFACE is old and its use should be discouraged. Perhaps the examples should be updated to use some access specifier.
Edited by Ivan Sorokin