boostorg / boostorg/hana

Use Boost:: (or other) namespace for cmake exports

Open
#414 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
1.9k
Forks
225
PR merge metrics
No merged PRs in 30d

Description

* The `NAMESPACE` keyword of the [`install( EXPORT )` command](https://github.com/boostorg/hana/blob/6187d448df49db085d4d7ad63d3a5f479594c5cf/CMakeLists.txt#L63) should be used. Targets in namespaces containing `::` can be distinguished from libraries resulting in better error messages (popping up during configuration, instead of linking) if the target was not found.

* Using `Boost::` as namespace would make the resulting target name coherent with the result of `find_package( Boost )` which ~~creates~~ should create an imported target `Boost::hana` (currently, only library targets [are exported as `Boost::`](https://cmake.org/cmake/help/v3.9/module/FindBoost.html))

Thank you for the nice `CMakeLists.txt` ;)

Contributor guide

Open the contributing guide

Research direction

Start in CMakeLists.txt at the install(EXPORT) command linked in the issue, and inspect how exported target names are currently formed. Check CMake's NAMESPACE behavior and the existing Boost:: component naming, then verify that the generated exports use the intended namespace and produce the expected configuration-time diagnostics.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.