In most commands the only important thing is to match ARG_NAME and ARG_VALUE correctly and the order of those doesn’t matter. It, of course, only stands if there are named arguments. Positional arguments have fixed order.
Does that also apply to arguments without value? For example, can EXCLUDE_FROM_ALL in install command be placed anywhere in the command invocation?
What about the commands where the order of arguments do matter? Is it always mentioned in the documentation or how can one know in which commands the order matters and in which it doesn’t?
The only positional arguments can appear in the beginning of the argument list. Anything without a dedicated KEYWORD-like argument signifier can be assumed to be positional (e.g., in add_library(tgt), tgt is positional and must be first).