Switch g++ commands to a CMake target for python.