Howto find header-only libraries properly
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- cmake
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu với các ví dụ Boost::headers và find_package(Boost 1.84.0 REQUIRED headers) trong issue, sau đó so sánh metadata CMake cho các bản build Boost dưới dạng subproject, CMake bên ngoài và B2. Được xem là hoàn thành khi dự án có một cách đã được thống nhất và có tính lâu dài để phát hiện các thư viện header-only trong cả ba môi trường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I am not sure if this is the right place to ask this question, but since it's CMake related, i give it a try.
First some background, i am using CMake to build my projects, most of my projects link against an installed Boost library, only very few projects compile a private version of Boost themself during their build and link against this one. Until recently i was using only B2 builds of Boost, but now i switched to CMake builds, mostly to profit of the transitive dependency resolution to reduce compilation for projects that build Boost themself. Of course i was hit by the problem that the target Boost::headers does nothing in that case and i have to link against header-only libraries directly.
Now i'm facing the difficulty that a big library of mine has to work in both environments, Boost as subproject and an external Boost. To find the external Boost header-only libraries i use the usual find_package(Boost 1.84.0 REQUIRED headers) call, this gives me Boost::headers to link against. This target also exists when using Boost as subproject, but in that case it is not IMPORTED. My first idea was, check if that target is IMPORTED, use it in that case, otherwise link against indiviual libraries. Doesn't look nice, but would work.
Looking at the CMake metadata of a CMake Boost build i saw that there is code to actually create targets for individual header-only libraries, but for this to get actually used, i also have to search for these libraries explicit like find_package(Boost 1.84.0 REQUIRED asio smart_ptr). I like that approach but there is one problem, this does not work for a B2 build, that one does not contain targets for individual header-only libraries.
Now i wonder, what would be a future proof way to search for header-only libraries?
- Ngôn ngữ chính
- CMake
- Star
- 119
- Fork
- 38
- Merge trung bình
- 10 giờ 51 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của boostorg/cmake
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
-
Delete merged branchesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
boost::asio doesn't seem to install with cmake on version 1.89Có thể đã có người làm @yurybura đã nhận 447 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
issue in moveit_coreĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 15/100
-
Document BoostConfig.cmake?Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Tất cả issue của boostorg/cmake
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
area:render needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bherbruck/solvecraft#13138 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
voidzero-dev/vite-plus#3381 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
ccch1mneyyy/dsh-Go#728 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
blinklabs-io/dingo#6057 ·
Maintainer thường phản hồi trong vòng 1 ngày