only build doc if all the required flags are enabled