Quote: We therefore, having taken counsel of some of Our Venerable Brothers among the Cardinals of the Holy Roman Church, and also of Our own accord and with certain knowledge and mature deliberations, with the plenitude of the Apostolic power do hereby determine and have decreed that these same Societies, Companies, Assemblies, Meetings, Congregations, or Conventicles of Liberi Muratori or Francs Massons, or whatever other name they may go by, are to be condemned and prohibited, and by Our present Constitution, valid for ever, We do condemn and prohibit them.

His Holiness Pope Leo XIII was most insistent that all Catholics should avoid Freemasonry in any form.

I would also refer you to the document Quaesitum est which clarified the Church's position and was issued in 1983 by the then Cardinal Ratzinger now HH Pope Benedict XVI which states that

Quote: Therefore the Church?s negative judgment in regard to Masonic association remains unchanged since their principles have always been considered irreconcilable with the doctrine of the Church and therefore membership in them remains forbidden. The faithful who enrol in Masonic associations are in a state of grave sin and may not receive Holy Communion.