Pumas will be Barcelona's opponent in the Joan Gamper trophy to be played on August 7 at Camp Nou, as announced by the Catalan club.
Barcelona had been scheduled to face Jose Mourinho's AS Roma, before the Italian club pulled out.
The match is scheduled to kick off at 20:00 local time. The women's team will face Montpellier on August 23 also at 20:00 at Estadi Johan Cruyff.
The idea was that Barcelona would face the same opponent in both categories, but it was not possible.
After Roma cancelled on the men's team, Barcelona then negotiated with Milan and Atlas, but without success.
The reason for so many problems in finding an opponent was that the ECA pressured European clubs not to attend the Gamper Trophy because of Barcelona's support for the European Super League. And, in the end, Barcelona were unable to find an opponent on the old continent.