Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[cmake] `add_subdirectory` support

Đang mở
#47 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/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, cpp
Lĩnh vực
build-system

Hướng nghiên cứu

Start by reading the repository's CMakeLists.txt and compare its current structure with the proposed add_subdirectory setup in this issue. Clarify which inclusion and linking behavior the project should support; done means the intended CMake integration works for a consuming project.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Thank you library creators for protecting peoples minds from Microsoft C interfaces!

But why every 3rd library with CMakeLists.txt can't setup a sane project inclusion!?
It is was not hard to create one for this library.

# Setup: odbc-cpp-wrapper (C++ Wrapper for ODBC) #
if(MINGW)
  set(ODBC_INCLUDE_DIR "" CACHE PATH "[MinGW] prevent '../Windows Kits/..' inclusion from VS dev env")
endif()
find_package(ODBC REQUIRED)
file(GLOB_RECURSE ODBCCPP_SOURCE_FILES_ "${CMAKE_SOURCE_DIR}/deps/odbc-cpp-wrapper/src/*.cpp")
add_library               (odbccpp STATIC ${ODBCCPP_SOURCE_FILES_})
target_include_directories(odbccpp SYSTEM PUBLIC  "${CMAKE_SOURCE_DIR}/deps/odbc-cpp-wrapper/src")
target_compile_definitions(odbccpp        PUBLIC  ODBC_STATIC)
target_link_libraries     (odbccpp        PUBLIC  ODBC::ODBC)
set_target_properties     (odbccpp PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)
target_link_libraries(${PROJECT_NAME} odbccpp)

Should I try to contribute to project's CMakeLists.txt?

Ngôn ngữ chính
C++
Star
53
Fork
30
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SAP/odbc-cpp-wrapper

Tất cả issue của SAP/odbc-cpp-wrapper

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.