boostorg / boostorg/cmake

Cannot find some headers

Open
#45 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
CMake
Stars
120
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to install boost v1.83.0 with CPM.cmake, but some headers like the ones in cannot be found in the standard path during build. Can you tell me why and/or help me please?

Below are a simple CMakeLists.txt and a simple program reproducing the problem (also with boost 1.82.0...):

```
# CMakeLists.txt
add_executable(CPMExampleBoost main.cpp)
target_compile_features(CPMExampleBoost PRIVATE cxx_std_17)

file(
DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.3/CPM.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
EXPECTED_HASH SHA256=cc155ce02e7945e7b8967ddfaff0b050e958a723ef7aad3766d368940cb15494
)
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)

set(Boost_DEBUG ON)

CPMAddPackage(
NAME Boost
VERSION 1.83.0
GITHUB_REPOSITORY "boostorg/boost"
GIT_TAG "boost-1.83.0"
)

target_link_libraries(CPMExampleBoost PRIVATE Boost::headers)
```

```
// Taken from https://www.boost.org/doc/libs/1_83_0/doc/html/accumulators/user_s_guide.html

#include
#include
#include
#include
#include
using namespace boost::accumulators;

int main() {
accumulator_set>> acc;

acc(1.2);
acc(2.3);
acc(3.4);
acc(4.5);

std::cout << "Mean: " << mean(acc) << std::endl;
std::cout << "Moment: " << moment<2>(acc) << std::endl;
}

```

main.cpp:4:10: fatal error: boost/accumulators/accumulators.hpp: No such file or directory
4 | #include

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.