Skip to content

Commit a719aff

Browse files
authored
Build system: when building the HTML docs, exclude SuiteSparse if USE_GPL_LIBS=0 (#47361)
1 parent 47ef407 commit a719aff

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

doc/make.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ cd(joinpath(@__DIR__, "src")) do
2424
Base.rm("stdlib"; recursive=true, force=true)
2525
mkdir("stdlib")
2626
for dir in readdir(STDLIB_DIR)
27+
if (dir == "SuiteSparse") && (!Base.USE_GPL_LIBS)
28+
@info "Excluding SuiteSparse from the docs because Base.USE_GPL_LIBS is false"
29+
continue
30+
end
2731
sourcefile = joinpath(STDLIB_DIR, dir, "docs", "src")
2832
if dir in EXT_STDLIB_DOCS
2933
sourcefile = joinpath(sourcefile, "basedocs.md")
@@ -236,12 +240,14 @@ DocMeta.setdocmeta!(
236240
maybe_revise(:(using SparseArrays, LinearAlgebra));
237241
recursive=true, warn=false,
238242
)
239-
DocMeta.setdocmeta!(
240-
SuiteSparse,
241-
:DocTestSetup,
242-
maybe_revise(:(using SparseArrays, LinearAlgebra, SuiteSparse));
243-
recursive=true, warn=false,
244-
)
243+
if Base.USE_GPL_LIBS
244+
DocMeta.setdocmeta!(
245+
SuiteSparse,
246+
:DocTestSetup,
247+
maybe_revise(:(using SparseArrays, LinearAlgebra, SuiteSparse));
248+
recursive=true, warn=false,
249+
)
250+
end
245251
DocMeta.setdocmeta!(
246252
UUIDs,
247253
:DocTestSetup,

0 commit comments

Comments
 (0)