Skip to content

Commit

Permalink
attempt to fix Mac CI issue due to change of llvm cmake file location
Browse files Browse the repository at this point in the history
  • Loading branch information
grasph committed May 31, 2024
1 parent 38c4a85 commit 881a5bf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ jobs:
if [ "$RUNNER_OS" = Linux ]; then
cmake -DClang_DIR=/usr/lib/llvm-13/lib/cmake/clang -B build -S .
else #MacOS
cmake -DClang_DIR=/usr/local/Cellar/llvm@13/13.0.1_2/lib/cmake/clang/ -B build -S .
#cmake -DClang_DIR=/usr/local/Cellar/llvm@13/13.0.1_2/lib/cmake/clang/ -B build -S .
ls /opt/homebrew/opt/llvm@13/
ls /opt/homebrew/opt/llvm@13/lib
cmake -DClang_DIR=/opt/homebrew/opt/llvm@13/lib/cmake -B build -S .
fi
cmake --build build --verbose -j `nproc`
PATH="`pwd`/build:$PATH"
Expand Down
19 changes: 19 additions & 0 deletions src/CodeTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ CodeTree::generate_non_template_add_type_cxx(std::ostream& o,
void
CodeTree::generate_cxx(){

wrapped_methods_.clear();

//default filename for type wrapper code:
std::string type_out_fname = std::string("jl") + module_name_ + ".cxx";

Expand Down Expand Up @@ -992,6 +994,7 @@ CodeTree::method_cxx_decl(std::ostream& o, const MethodRcd& method,
o << "\n";

wrapper.generate(o, get_index_generated_);
wrapped_methods_.push_back(wrapper.signature());

import_getindex_ |= wrapper.defines_getindex();
import_setindex_ |= wrapper.defines_setindex();
Expand Down Expand Up @@ -2294,6 +2297,9 @@ CodeTree::parse(){
files_to_wrap_fullpaths_.clear();
for(const auto& fname: files_to_wrap_){
files_to_wrap_fullpaths_.push_back(resolve_include_path(fname));
//DEBUG>>
std::cerr << "File to wrap: " << files_to_wrap_fullpaths_.back() << "\n";
//<<DEBUG
header_file << "#include \"" << fname << "\"\n";
}

Expand Down Expand Up @@ -2462,6 +2468,19 @@ std::ostream& CodeTree::report(std::ostream& o){
o << "None";
}
o << "\n";

o << "\nList of wrapped classed:\n\n";
for(const auto& t: types_){
if(t.to_wrap){
o << t.type_name << "\n";
}
}

o << "\n\nList of wrapped methods:\n\n:";
for(const auto& m: wrapped_methods_){
o << m << "\n";
}

return o;
}

Expand Down
3 changes: 2 additions & 1 deletion src/CodeTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ namespace codetree{
int include_depth_;
std::vector<std::string> files_to_wrap_;
std::vector<std::string> files_to_wrap_fullpaths_;

std::vector<std::string> wrapped_methods_;

int n_classes_per_file_;
std::string out_cxx_dir_;
std::string out_jl_dir_;
Expand Down
2 changes: 2 additions & 0 deletions test/TestAccessAndDelete/TestAccessAndDelete.wit
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ export = "all"

# all generated code in a single file:
n_classes_per_file = 0

#cxxwrap_version = "0.15.0"

0 comments on commit 881a5bf

Please sign in to comment.