Fix gcc/clang issue in cmake