Skip to content

Commit

Permalink
Fix finding Resource Dir (#171)
Browse files Browse the repository at this point in the history
* Fix finding Resource Dir

* Update src/xinterpreter.cpp

Co-authored-by: Vassil Vassilev <[email protected]>

* Update src/xinterpreter.cpp

Co-authored-by: Vassil Vassilev <[email protected]>

---------

Co-authored-by: Vassil Vassilev <[email protected]>
  • Loading branch information
anutosh491 and vgvassilev authored Nov 8, 2024
1 parent a0f92be commit d4b7813
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xinterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ using Args = std::vector<const char*>;

void* createInterpreter(const Args &ExtraArgs = {}) {
Args ClangArgs = {/*"-xc++"*/"-v"}; // ? {"-Xclang", "-emit-llvm-only", "-Xclang", "-diagnostic-log-file", "-Xclang", "-", "-xc++"};
if (std::find(ExtraArgs.begin(), ExtraArgs.end(), "-resource-dir") == ExtraArgs.end()) {
if (std::find_if(ExtraArgs.begin(), ExtraArgs.end(), [](const std::string& s) {
return s == "-resource-dir";}) == ExtraArgs.end()) {
std::string resource_dir = Cpp::DetectResourceDir();
if (resource_dir.empty())
std::cerr << "Failed to detect the resource-dir\n";
Expand Down

0 comments on commit d4b7813

Please sign in to comment.