Tranlated from python to c++.  Refs #7948.
Updated CMake.  Refs #7948.
Updated due to previous change to C++.  Refs #7948.