-
Notifications
You must be signed in to change notification settings - Fork 9
Link readline for C and C++ #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…or C and C++ solutions
WalkthroughThe changes update several CMake configuration files across C and C++ starter templates and solution directories. In each affected file, the executable target Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
🚧 Files skipped from review as they are similar to previous changes (8)
⏰ Context from checks skipped due to timeout of 90000ms (8)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (6)
starter_templates/cpp/code/CMakeLists.txt (1)
10-11
: Duplicate suggestion: usefind_package(Readline)
See the recommendation insolutions/cpp/02-cz2/code/CMakeLists.txt:10-11
for usingfind_package(Readline REQUIRED)
and linking${READLINE_LIBRARIES}
withtarget_include_directories
.starter_templates/c/code/CMakeLists.txt (1)
10-11
: Duplicate suggestion: usefind_package(Readline)
See the recommendation insolutions/cpp/02-cz2/code/CMakeLists.txt:10-11
for invokingfind_package(Readline REQUIRED)
and linking${READLINE_LIBRARIES}
/imported target instead of hard-codingreadline
.solutions/c/02-cz2/code/CMakeLists.txt (1)
10-11
: Duplicate suggestion: usefind_package(Readline)
Refer tosolutions/cpp/02-cz2/code/CMakeLists.txt:10-11
for guidance on using CMake’sfind_package(Readline REQUIRED)
and consuming${READLINE_LIBRARIES}
and${READLINE_INCLUDE_DIRS}
.solutions/cpp/01-oo8/code/CMakeLists.txt (1)
10-11
: Duplicate suggestion: usefind_package(Readline)
As noted insolutions/cpp/02-cz2/code/CMakeLists.txt:10-11
, consider adding:find_package(Readline REQUIRED) target_link_libraries(shell PRIVATE ${READLINE_LIBRARIES}) target_include_directories(shell PRIVATE ${READLINE_INCLUDE_DIRS})to enhance portability.
compiled_starters/c/CMakeLists.txt (1)
11-11
: Duplicate: Ensure portable discovery of the readline library.Same suggestion applies here—invoke
find_package(Readline REQUIRED)
and link againstReadline::Readline
instead of hardcodingreadline
.compiled_starters/cpp/CMakeLists.txt (1)
11-11
: Duplicate: Ensure portable discovery of the readline library.Same suggestion applies here—invoke
find_package(Readline REQUIRED)
and link againstReadline::Readline
instead of hardcodingreadline
.
🧹 Nitpick comments (1)
solutions/cpp/02-cz2/code/CMakeLists.txt (1)
10-11
: Addreadline
linkage toshell
target
Linkingreadline
is essential for interactive line-editing support. For improved portability and automatic discovery of headers and libraries, consider invoking CMake’s package finder before linking:+ find_package(Readline REQUIRED) + target_link_libraries(shell + PRIVATE + ${READLINE_LIBRARIES} + ) + target_include_directories(shell + PRIVATE + ${READLINE_INCLUDE_DIRS} + )This ensures CMake errors out if
readline
isn’t available and correctly sets include paths.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
compiled_starters/c/CMakeLists.txt
(1 hunks)compiled_starters/cpp/CMakeLists.txt
(1 hunks)solutions/c/01-oo8/code/CMakeLists.txt
(1 hunks)solutions/c/02-cz2/code/CMakeLists.txt
(1 hunks)solutions/cpp/01-oo8/code/CMakeLists.txt
(1 hunks)solutions/cpp/02-cz2/code/CMakeLists.txt
(1 hunks)starter_templates/c/code/CMakeLists.txt
(1 hunks)starter_templates/cpp/code/CMakeLists.txt
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: test_course_definition / test (zig)
- GitHub Check: test_course_definition / test (rust)
- GitHub Check: test_course_definition / test (kotlin)
- GitHub Check: test_course_definition / test (java)
- GitHub Check: test_course_definition / test (go)
- GitHub Check: test_course_definition / test (csharp)
- GitHub Check: test_course_definition / test (cpp)
- GitHub Check: test_course_definition / test (c)
Summary by CodeRabbit