[cmake] Avoid rel+asserts warnings when passing -UNDEBUG