South African rand weakens ahead of BRICS, CPI