-
Notifications
You must be signed in to change notification settings - Fork 30
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
Added target_compile_definitions for XEUS_SEARCH_PATH #245
base: main
Are you sure you want to change the base?
Conversation
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.
clang-tidy made some suggestions
|
||
#ifdef XEUS_SEARCH_PATH | ||
std::string search_path = XEUS_SEARCH_PATH; | ||
std::istringstream iss(search_path); |
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.
warning: no header providing "std::istringstream" is directly included [misc-include-cleaner]
src/xinterpreter.cpp:19:
- #ifndef EMSCRIPTEN
+ #include <sstream>
+ #ifndef EMSCRIPTEN
std::string search_path = XEUS_SEARCH_PATH; | ||
std::istringstream iss(search_path); | ||
std::string path; | ||
while (std::getline(iss, path, ':')) { |
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.
warning: no header providing "std::getline" is directly included [misc-include-cleaner]
while (std::getline(iss, path, ':')) {
^
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #245 +/- ##
==========================================
+ Coverage 80.72% 80.85% +0.13%
==========================================
Files 19 19
Lines 970 977 +7
Branches 93 95 +2
==========================================
+ Hits 783 790 +7
Misses 187 187
|
Description
This PR introduces a change to the build system by adding a
target_compile_definitions
directive forXEUS_SEARCH_PATH
. The added definition dynamically sets the include directories for thexeus-cpp
project by joining the values of theINCLUDE_DIRECTORIES
property.I have tried to take a similar approach as was taken for xeus-cling.
Fixes #175
Type of change
Please tick all options which are relevant.