Fixed cmake file when test the level existence.