Generate options for optional and recommended requirements
This commit is contained in:
parent
26c0524f1a
commit
e9014c436c
@ -740,8 +740,8 @@ private
|
|||||||
end
|
end
|
||||||
|
|
||||||
def depends_on dep
|
def depends_on dep
|
||||||
dependencies.add(dep)
|
d = dependencies.add(dep)
|
||||||
post_depends_on
|
post_depends_on(d) unless d.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def option name, description=nil
|
def option name, description=nil
|
||||||
@ -806,14 +806,13 @@ private
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def post_depends_on
|
def post_depends_on(dep)
|
||||||
# Generate with- and without- options for optional and recommended deps
|
# Generate with- or without- options for optional and recommended
|
||||||
dependencies.deps.each do |dep|
|
# dependencies and requirements
|
||||||
if dep.optional? && !build.has_option?("with-#{dep.name}")
|
if dep.optional? && !build.has_option?("with-#{dep.name}")
|
||||||
build.add("with-#{dep.name}", "Build with #{dep.name} support")
|
build.add("with-#{dep.name}", "Build with #{dep.name} support")
|
||||||
elsif dep.recommended? && !build.has_option?("without-#{dep.name}")
|
elsif dep.recommended? && !build.has_option?("without-#{dep.name}")
|
||||||
build.add("without-#{dep.name}", "Build without #{dep.name} support")
|
build.add("without-#{dep.name}", "Build without #{dep.name} support")
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user