boost configured with -DBOOST_INCLUDE_LIBRARIES=headers does not install headers
- Dominant language
- CMake
- Stars
- 120
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to install only the boost headers using the cmake build system. My impression was that this could be achieved by configuring with ```cmake -DBOOST_INCLUDE_LIBRARIES=headers```. However, this seems to result in installing only the cmake files, but not the headers.
In direct comparison, using b2, ```bootstrap --with-libraries=headers``` works as expected.
In detail:
```
wget https://github.com/boostorg/boost/releases/download/boost-1.92.0/boost-1.92.0-cmake.tar.xz
tar xf boost-1.92.0-cmake.tar.xz
cd boost-1.92.0
cmake -DBOOST_INCLUDE_LIBRARIES=headers .
make install DESTDIR=/tmp
```
Full output of make install:
```
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /tmp/usr/local/include
-- Up-to-date: /tmp/usr/local/include/boost
-- Up-to-date: /tmp/usr/local/include/boost/headers
-- Up-to-date: /tmp/usr/local/include/boost/headers/.gitkeep
-- Installing: /tmp/usr/local/lib/cmake/boost_headers-1.92.0/boost_headers-targets.cmake
-- Installing: /tmp/usr/local/lib/cmake/boost_headers-1.92.0/boost_headers-config.cmake
-- Installing: /tmp/usr/local/lib/cmake/boost_headers-1.92.0/boost_headers-config-version.cmake
-- Up-to-date: /tmp/usr/local/lib/cmake/Boost-1.92.0/BoostConfig.cmake
-- Installing: /tmp/usr/local/lib/cmake/Boost-1.92.0/BoostConfigVersion.cmake
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with `cmake -DBOOST_INCLUDE_LIBRARIES=headers .` followed by `make install DESTDIR=/tmp`, then trace how the `headers` selection controls installation. Done means the Boost headers are installed along with the generated CMake package files, matching the b2 `--with-libraries=headers` behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100