Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition on the presence of a library #543

Open
gildor478 opened this issue Oct 24, 2020 · 0 comments
Open

Condition on the presence of a library #543

gildor478 opened this issue Oct 24, 2020 · 0 comments

Comments

@gildor478
Copy link
Member

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... ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant