oasis
oasis copied to clipboard
Flag: allow for more than just boolean flags
This feature request has been migrated from artifact #851 on forge.ocamlcore.org. It was assigned to user102.
user824 posted on 2010-12-29 22:43:02:
Currently flags are only boolean (unless I missed something). It'd be good if command-line flags to configure could take an argument, like instead of: --enable-foo, you could specify --with-foo=/path/to/foo (useful when linking to C libs), and then make that argument usable in _oasis via substitutions.
user102 replied on 2010-12-29 23:49:55:
Unfortunatly, I cannot really do something about that. The fact that values are booleans is made on purpose to let the "future" oasis solves the SAT wrt of dependencies (e.g. you install a library where one sub library depends on lablgtk and the build value depends on flag(lablgtk), the program can guess that lablgtk must be false to satisfy the pre-requisite).
String variables cannot be guessed easily. I keep this bug open, because this is not a "I won't do it", but a "wait and see".
user824 replied on 2010-12-30 08:07:26:
Hmm, how about you only allow it to be used for substitutions? Then it wouldn't be a flag, and have no effect on dependencies, lets call it "ConfigureSubstitutions" for example.
Anyway not something I need right now, but I thought I mention it.
user17083 replied on 2014-06-02 11:56:04:
Hello,
I am very interesting too by this feature, it would be great to configure something in the whole application.
Thank you in advance.
user102 replied on 2016-11-03 00:13:36:
More info: http://oasis.forge.ocamlcore.org/faq.html#string-flag
user102 replied on 2016-11-03 00:17:20:
Török, the way described in the the FAQ to add it, even if not perfect, looks like a good intermediate solution: http://oasis.forge.ocamlcore.org/faq.html#string-flag
Given the fact that I think, it is easy to use this way, I will close the feature request later, except if you still think it absolutely needs to be implemented.