Skip to content

Commit

Permalink
hardcode julia dep
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Dec 13, 2024
1 parent 899dbef commit e11c5e1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
4 changes: 3 additions & 1 deletion deps/ReactantExtra/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ cc_library(
"-Werror=return-type",
"-Werror=unused-result",
"-Wno-error=stringop-truncation",
# "-I$(location @libcxxwrap_julia//:include)"
# "-I$(location @libcxxwrap_julia//:include)",
"-Iexternal/libcxxwrap_julia/include/",
"-Iexternal/julia/include/julia/",
],
alwayslink = True,
linkstatic = True,
Expand Down
3 changes: 3 additions & 0 deletions deps/ReactantExtra/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ workspace(name = "Reactant")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

load("//third_party/julia:workspace.bzl", julia_workspace = "repo")
julia_workspace()

load("//third_party/libcxxwrap_julia:workspace.bzl", libcxxwrap_julia_workspace = "repo")
libcxxwrap_julia_workspace()

Expand Down
Empty file.
10 changes: 10 additions & 0 deletions deps/ReactantExtra/third_party/julia/julia.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
licenses(["notice"])

package(default_visibility = ["//visibility:public"])

cc_import(
name = "julia",
hdrs = glob(["include/**/*"]),
includes = ["include"],
shared_library = "lib/libjulia.dylib",
)
9 changes: 9 additions & 0 deletions deps/ReactantExtra/third_party/julia/workspace.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""Loads julia."""

def repo():
# TODO change this to download the real artifacts or build them from source?
native.new_local_repository(
name = "julia",
path = "/Users/mofeing/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/",
build_file = "//third_party/julia:julia.BUILD",
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ package(default_visibility = ["//visibility:public"])

cc_import(
name = "libcxxwrap_julia",
hdrs = glob(["include/jlcxx/*.hpp"]),
hdrs = glob(["include/**/*.hpp"]),
includes = ["include"],
shared_library = "lib/libcxxwrap_julia.dylib",
visibility = ["//visibility:public"],
deps = [
"@julia",
],
)

0 comments on commit e11c5e1

Please sign in to comment.