Conversation
There was a problem hiding this comment.
Pull request overview
Updates the STL learning module’s CMake configuration to ensure the algorithms test target links against Intel oneTBB.
Changes:
- Add a CMake
find_package(TBB REQUIRED)dependency inlearning_stl. - Link
test_algorithmsagainstTBB::tbbvia the existingadd_learning_test(...)helper.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
learning_stl/CMakeLists.txt
Outdated
| find_package(TBB REQUIRED) | ||
|
|
There was a problem hiding this comment.
find_package(TBB REQUIRED) makes TBB a hard configure-time dependency for the entire project because learning_stl is always added via add_subdirectory(...) (top-level CMakeLists.txt:40). That will break configuration on environments where TBB isn’t installed, even though only test_algorithms links it. Consider (a) moving find_package(TBB ...) to the top-level alongside other dependencies and/or (b) making TBB optional and only adding/linking test_algorithms when TBB is found (with a clear message when it’s skipped).
learning_stl/CMakeLists.txt
Outdated
| find_package(TBB REQUIRED) | ||
|
|
||
| add_learning_test(test_container_internals tests/test_container_internals.cpp instrumentation) | ||
| add_learning_test(test_iterators tests/test_iterators.cpp instrumentation) | ||
| add_learning_test(test_algorithms tests/test_algorithms.cpp instrumentation) | ||
| add_learning_test(test_algorithms tests/test_algorithms.cpp instrumentation TBB::tbb) |
There was a problem hiding this comment.
The PR description is still the default template (no filled-in rationale, linked issue, or testing notes). Since this change introduces a new external dependency (TBB) and changes link behavior, please update the PR description to explain the motivating linker failure/use-case and how it was validated (e.g., which compiler/libstdc++/CI environment).
Description
Brief description of what this PR changes and why.
Fixes #(issue number, if applicable)
Type of Change
Changes Made
Testing
How have you tested these changes?
ctest --preset gcc --verbose)Test Output (if applicable)
Code Quality Checklist
Documentation
docs/LEARNING_PATH.md(if adding or changing module registration)Socratic Pattern (if applicable)
For changes involving Q/A/R content:
Additional Notes
Any additional context, screenshots, or information that reviewers should know.
License Agreement