summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-05-24 08:28:29 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-05-24 14:57:26 +0300
commitfdad47c994df77f4ecf7c60baa3193ccf3542145 (patch)
tree7a1b544fbd82b714539df06a06c6461e1c79bbb5 /benchmarks
parent996b4346b6a7f2bd0919817648a4f7a382e59757 (diff)
man/build: Fix dependency handling
build_man is a 'feature' option, which means that we get an opaque object, so comparing it to 'yes' is always false. It should have been 'if build_man.enabled()'. But going even further we can prune the whole check, as rst2man is defined as follows: rst2man = find_program('rst2man-3', 'rst2man', required : build_man) >From the patch overhauling those options: get_option() on a feature returns opaque object that can be passed as a 'required' argument of a dependency. Auto is equivalent to 'required : false', enabled is equivalent to 'required : true' and disabled introduces new behavior forcing the dependency to be considered not found. This would cause the build to fail if build_man is enabled (aka 'required') and rst2man is not found. So... if rst2man.found() # rst2man found # buildu buildu else # rst2man not found, but considered optional because # we haven't erred out on find_program if build_man.enabled() # cannot be, it's optional! error('...') endif endif We can get rid of the whole else block here. Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com>
Diffstat (limited to 'benchmarks')
0 files changed, 0 insertions, 0 deletions