Completed cmake_ndebug_test

Tested with Visual Studio, NDEBUG=1 for all but Debug builds.