picking execute_process command based on OS
specifying minimum cmake version so that no warning has to be suppressed