Skip to content

Commit 9dbc603

Browse files
committed
[build] Have a single definition of C++ compiler (#20)
1 parent a3ea9f4 commit 9dbc603

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

deps/build.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ using UUIDs
1414
##
1515

1616
const libpoplar_dir = joinpath(get_scratch!(UUID(TOML.parsefile(joinpath(dirname(@__DIR__), "Project.toml"))["uuid"]), "libpoplar"), "v$(Base.thispatch(VERSION))")
17+
const cxx = get(ENV, "CXX", "g++")
1718
const allowed_namespaces = ("poplar", "popops")
1819

1920
# TODO: I really shouldn't be using strings everywhere for these
@@ -34,7 +35,6 @@ DefaultBindgenContext() = DefaultBindgenContext([], [], Set([]), Set([]), "", ""
3435

3536

3637
function get_system_includes()::Vector{String}
37-
cxx = get(ENV, "CXX", "g++")
3838
io = IOBuffer()
3939
readchomp(pipeline(`$(cxx) -x c++ -E -Wp,-v - -fsyntax-only`; stdin=IOBuffer(""), stderr=io))
4040
m = match(r"#include <\.\.\.> search starts here:(.*)End of search list\."s, String(take!(io)))[1]
@@ -640,7 +640,6 @@ function build_bindings(; path::String=joinpath(libpoplar_dir, "libpoplar_julia.
640640

641641
if compile
642642
cxxwrap_include_dir = joinpath(libcxxwrap_julia_jll.artifact_dir, "include")
643-
cxx = get(ENV, "CXX", "g++-10")
644643
julia_include_dir = joinpath(dirname(Sys.BINDIR), "include", "julia")
645644
mkpath(dirname(path))
646645
run(```

0 commit comments

Comments
 (0)