Changes in templating for gnu compilers. Updated CMake to do BGQ