include-what-you-use is included but is not presented as a CMake option
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cmake
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu trong cmake/StaticAnalyzers.cmake và phần cuối của ProjectOptions.cmake, so sánh đường dẫn include-what-you-use với myproject_enable_clang_tidy và với phần triển khai trước đó được liên kết trong issue. Cấu hình dự án hoặc mở cmake-gui để xác minh rằng tùy chọn include-what-you-use được hiển thị và việc bật tùy chọn này sẽ đi đến macro hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In /cmake/StaticAnalyzers.cmake, the macro myproject_enable_include_what_you_use is declared.
However, myproject_enable_include_what_you_use is never actually set as an option elsewhere. Therefore, it's not possible to set it as an option in places like cmake-gui or based on the configuration.
For instance, myproject_enable_clang_tidy is right above it. I see that at the bottom of ProjectOptions.cmake that macro is called if myproject_ENABLE_CLANG_TIDY is set to true. There is no equivalent for myproject_enable_include_what_you_use.
It appears when iwyu was added, https://github.com/cpp-best-practices/cmake_template/blob/3a8c8f9793fb9805af558bfe097491e9a6efc97c/cmake/StaticAnalyzers.cmake was simpler. It did have option(ENABLE_INCLUDE_WHAT_YOU_USE "Enable static analysis with include-what-you-use" OFF).
StaticAnalyzers.cmake has had some changes, but it appears
macro(myproject_enable_include_what_you_use)
find_program(INCLUDE_WHAT_YOU_USE include-what-you-use)
if(INCLUDE_WHAT_YOU_USE)
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDE_WHAT_YOU_USE})
else()
message(WARNING "include-what-you-use requested but executable not found")
endif()
endmacro()
is orphaned code that doesn't do anything. If I am mistaken hopefully, someone can explain this a little bit better to me. I've had to heavily edit my fork of this template because we can only support CMake 3.12 at this time, due to our usage of MSVS 2017. I'm doing some cleanup and noticed that iwyu is never really used. Looking at the code on the main branch, I don't see it being used so it's not like I unintentionally removed it.
- Ngôn ngữ chính
- CMake
- Star
- 1.8k
- Fork
- 205
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
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 cpp-best-practices/cmake_template
-
Put back `-Wsign-conversion` for gcc in CompilerWarnings.cmakeCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Enable sanitizers globallyĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
cpp-best-practices/cmake_template#140 · 2 bình luận ·
-
From-scratch clone/build fails on `src/ftxui_sample/CMakeFiles/intro.dir/main.cpp.obj`Có thể đã có người làm @leftibot đã nhận 195 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
cpp-best-practices/cmake_template#139 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
cpp-best-practices/cmake_template#91 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
cpp-best-practices/cmake_template#79 · 4 bình luận · 1 reaction ·
Tất cả issue của cpp-best-practices/cmake_template
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
immortalwrt/immortalwrt#2522 ·
-
Font inlining cache is not created or reusedCó thể đã có người làm @nagahara-naoki đã nhận hôm nay. Đang mởarea: @angular/build
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
angular/angular-cli#34719 ·
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 72/100
osaurus-ai/osaurus#3422 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
foundation/foundation-emails#2127 ·