Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guptamukund22
Copy link

Description

This PR introduces a change to the build system by adding a target_compile_definitions directive for XEUS_SEARCH_PATH. The added definition dynamically sets the include directories for the xeus-cpp project by joining the values of the INCLUDE_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.

  • Bug fix
  • New feature
  • Added/removed dependencies
  • Required documentation updates

Copy link
Contributor

@github-actions github-actions bot left a 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);
Copy link
Contributor

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, ':')) {
Copy link
Contributor

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-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.85%. Comparing base (ba37f4f) to head (383efd6).

Additional details and impacted files

Impacted file tree graph

@@            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              
Files with missing lines Coverage Δ
src/xinterpreter.cpp 91.53% <100.00%> (+0.32%) ⬆️
Files with missing lines Coverage Δ
src/xinterpreter.cpp 91.53% <100.00%> (+0.32%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust include path search according to dependencies
2 participants