The self-consistent Hartree-Fock-Bogoliubov approximation based on the finite-range and density-dependent Gogny interaction (parametrization D1S) has been used to generate potential energy curves in various chains of Pd, Xe, Ba, Nd, Sm, Gd, and Dy isotopes. The evolution of shapes with the number of nucleons is studied and a search for signatures of E(5) and X(5) critical point symmetries is also conducted. The results are compared with those obtained in the framework of other mean-field approximations to the nuclear many-body problem. The role of triaxiality in nuclei where this degree of freedom could be relevant is considered and discussed.