Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ macro(xeus_cpp_create_target target_name linkage output_name)
target_link_libraries(${target_name} PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()

target_compile_definitions(${target_name} PRIVATE "XEUS_SEARCH_PATH=\"$<JOIN:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>,:>\"")

endmacro()

# xeus-cpp-headers
Expand Down
13 changes: 13 additions & 0 deletions src/xinterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ void* createInterpreter(const Args &ExtraArgs = {}) {
ClangArgs.push_back(CxxInclude.c_str());
}
#endif

#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 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, ':')) {
              ^

if (!path.empty()) {
ClangArgs.push_back("-I");
ClangArgs.push_back(path.c_str());
}
}
#endif

ClangArgs.insert(ClangArgs.end(), ExtraArgs.begin(), ExtraArgs.end());
// FIXME: We should process the kernel input options and conditionally pass
// the gpu args here.
Expand Down
Loading