Upgrade cmake module. Fix empty array bug.