add compiler options for release build

but debug build is selected as default.  if you want to select release
build, set -DCMAKE_BUILD_TYPE=Release option.
add test for functions and procedures