extended findthrift.cmake with cpp generation function