boostorg / callable_traits

modern C++ type traits and metafunctions for callable types
Boost Software License 1.0
130 stars 36 forks source link

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

Closed HDembinski closed 4 years ago

HDembinski commented 5 years ago

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)

HDembinski commented 5 years ago

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

badair commented 5 years ago

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

HDembinski commented 5 years ago

Great, I am looking forward to it. 👍

badair commented 4 years ago

Closing because the PR was merged...