Skip to content

Commit 2621737

Browse files
committed
Propagate the ROOTprefs method change
1 parent 7313a92 commit 2621737

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/CxxBuild.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function build_root_wrapper(rootsys = ROOTprefs.get_ROOTSYS())
131131
end
132132

133133
#Clean-up build area
134-
if is_clean_after_build_enabled()
134+
if get_clean_after_build()
135135
try
136136
splitpath(buildpath)[end-1] != "build" || error("Bug foud. buildpath must end with /build") #protect against wrong directory deletion after introduction of a bug
137137
rm(buildpath, recursive=true, force=true)
@@ -187,7 +187,7 @@ function check_rootsys()
187187

188188
i = findfirst(rootconfig->get_vers(rootconfig) supported_root_versions, binpaths)
189189

190-
if ( isnothing(i) && !ROOTprefs.is_root_version_checked()
190+
if ( isnothing(i) && !ROOTprefs.get_check_root_version()
191191
&& length(binpaths) > 0 && !isnothing(vers_from_rootsys))
192192
i = 1
193193
end
@@ -211,21 +211,21 @@ end
211211

212212
function get_or_build_libroot_julia()
213213

214-
if is_root_jll_used() && is_jll_supported()
214+
if get_use_root_jll() && is_jll_supported()
215215
#prebuilt wrapper used, no build to perform
216216
return ROOT_julia_jll.get_libroot_julia_path()
217217
end
218218

219-
if !is_root_jll_used() && is_jll_supported()
220-
@info "The plaform supports ROOT_jll. You can use ROOT libraries from the ROOT_jll package to skip the long compilation step. To switch to ROOT_jll, interrupt the import, run 'using ROOTprefs; use_root_jll!() to enable the ROOT_jll mode, restart Julia, and execute 'import ROOT' again."
219+
if !get_use_root_jll() && is_jll_supported()
220+
@info "The plaform supports ROOT_jll. You can use ROOT libraries from the ROOT_jll package to skip the long compilation step. To switch to ROOT_jll, interrupt the import, run 'using ROOTprefs; set_use_root_jll() to enable the ROOT_jll mode, restart Julia, and execute 'import ROOT' again."
221221
end
222222

223223
#Below, we process differently if root_jll mode is enabled or not
224224
#in order to adapt the error message.
225-
rootsys, pref_rootsys = if is_root_jll_used() #jll mode but platform not supported.
226-
use_root_jll!(false, nowarn = true)
225+
rootsys, pref_rootsys = if get_use_root_jll() #jll mode but platform not supported.
226+
set_use_root_jll(false, nowarn = true)
227227
intro = "Platform not supported by the prebuilt wrapper ROOT_julia_jll package."
228-
postface = "The mode 'use_root_jll' has been disabled (can be reenabled by executing `using ROOTprefs; use_root_jll!()`)."
228+
postface = "The mode 'use_root_jll' has been disabled (can be reenabled by executing `using ROOTprefs; set_use_root_jll()`)."
229229
try
230230
@warn("$intro $postface")
231231
rootsys, pref_rootsys = check_rootsys()
@@ -250,7 +250,7 @@ function get_or_build_libroot_julia()
250250

251251
if !isempty(libpath) && rootsys != pref_rootsys
252252
#If build succeeded and ROOTSYS was modified, update LocalPreference.toml
253-
set_ROOTSYS!(rootsys, nocheck=true)
253+
set_ROOTSYS(rootsys, nocheck=true)
254254
end
255255

256256
return libpath

src/ROOT.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ include("internals.jl")
2222
"""
2323
`root_jll_preferred`
2424
25-
Value of `use_root_jll` preference when this module was precompiled.
25+
Value of `set_use_root_jll` preference when this module was precompiled.
2626
2727
"""
28-
const root_jll_preferred = ROOTprefs.is_root_jll_used()
28+
const root_jll_preferred = ROOTprefs.get_use_root_jll()
2929

3030
"""
3131
`rootsys`

test/test_install.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import ROOT_jll
2424
using ROOTprefs
2525

26-
use_root_jll!(false)
27-
set_ROOTSYS!(ROOT_jll.artifact_dir)
26+
use_root_jll(false)
27+
set_ROOTSYS(ROOT_jll.artifact_dir)
2828
project_path = Pkg.project().path
2929

3030
rc = withenv("JULIA_LOAD_PATH" => join(LOAD_PATH, ":"),

0 commit comments

Comments
 (0)