Skip to content

Commit 376e3bf

Browse files
authored
Factor out the "find compiler" logic into a separate get_compiler_cmd function (#731)
* Factor out the "find compiler" logic into a separate `get_compiler_cmd` function * Bump the version from "2.0.11" to "2.1.0"
1 parent c0e6855 commit 376e3bf

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "PackageCompiler"
22
uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
3-
version = "2.0.11"
3+
version = "2.1.0"
44

55
[deps]
66
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

src/PackageCompiler.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ end
117117

118118
const WARNED_CPP_COMPILER = Ref{Bool}(false)
119119

120-
function run_compiler(cmd::Cmd; cplusplus::Bool=false)
120+
function get_compiler_cmd(; cplusplus::Bool=false)
121121
cc = get(ENV, "JULIA_CC", nothing)
122122
path = nothing
123123
@static if Sys.iswindows()
@@ -159,6 +159,11 @@ function run_compiler(cmd::Cmd; cplusplus::Bool=false)
159159
if path !== nothing
160160
compiler_cmd = addenv(compiler_cmd, "PATH" => string(ENV["PATH"], ";", dirname(path)))
161161
end
162+
return compiler_cmd
163+
end
164+
165+
function run_compiler(cmd::Cmd; cplusplus::Bool=false)
166+
compiler_cmd = get_compiler_cmd(; cplusplus)
162167
full_cmd = `$compiler_cmd $cmd`
163168
@debug "running $full_cmd"
164169
run(full_cmd)

0 commit comments

Comments
 (0)