handle cmake policies

fix compile warning