oasis
oasis copied to clipboard
Condition on the presence of a library
This feature request has been migrated from artifact #1533 on forge.ocamlcore.org. It was assigned to user102.
user144 posted on 2016-02-25 16:32:44:
It would be nice to have a predicate allowing to conditionally compile part of the code depending on the presence (or not) of a module (say Graphics which may not be present on OSX).
user102 replied on 2016-02-25 18:40:41:
The current way to do it, is to use a flag and let the user turn it off or on.
A possible way to do it, is to add a new test to conditional values: http://oasis.forge.ocamlcore.org/MANUAL.html#conditional-value
E.g has_findlib_package(fileutils) has_findlib_package_version(fileutils, >= 0.4.5)
user144 replied on 2016-02-25 18:57:08:
The current way to do it, is to use a flag and let the user turn it off or on.
This is what I did — except that I put some code in setup.ml to modify the default value for setup_t. :-)
has_findlib_package(fileutils) has_findlib_package_version(fileutils, >= 0.4.5)
Yes, this is what I am asking for... ;-)