Refactor #3585: Add CCFormatHelper into build files of samples