add exception support again
add cmake support