boostorg/callable_traits

CMake inconsistency, use namespace Boost::callable_traits as library name

Closed this issue · 4 comments

In the main CMakeLists.txt, I can find add_library(callable_traits INTERFACE) which is inconsistent with the conventions used by the 29 other Boost libraries that Boost::histogram (indirectly) depends on, see e.g. Boost::mp11, Boost::assert, Boost::config. They use the library name Boost::something.

Please add the following line to provide a conforming alias
add_library(Boost::callable_traits ALIAS callable_traits)

There is another problem: the master CMakeLists.txt needs an
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) around the tests, so that they are not loaded if callable_traits is used as a dependency by another project. An example on how to do this is given by mp11, https://github.com/boostorg/mp11/blob/a03e644dc70facf7318432ce9bb86da9009d3944/CMakeLists.txt#L17

Thanks! I'll get the fix merged in this week.

Great, I am looking forward to it. 👍

Closing because the PR was merged...