fix format security error
shuffle cmake scripts a bit