Hi, on installing a target, I launch a cmake script (set with install(SCRIPT...
) which, in turn launch shell scripts (with execute_process
) in order to prompt the user for some “last minute” input.
Yet if my installation command is launched in a non-interactive way, I’d like to bypass this prompt and resort to default values.
How can I do?
more precisely, the normal situation would be something like that in a terminal:
make install
<prompt user>
<finishing install>
But if I’m not in a terminal (for instance, launching the installation from a daemon at a given hour), I would like to replace <prompt user>
by <set default values>
Visibly, I cannot do that from the prompting shell which is already considered as non interactive, as it is launched from cmake script.
A basic workaround would be to pass an additionnal option at configuration time to ask for an install with or without prompt but an automated solution would be better for me.
Thanks, regards
A.