We present measurements of the complete set of third-order elastic constants ͑TOEC͒ of Cu-Al-Ni and Cu-Al-Be shape-memory alloys, as functions of temperature. These data quantify the elastic anharmonic behavior of these alloys on approaching their martensitic transformation. We provide experimental evidence that the martensitic transition in Cu-based shape-memory alloys occurs at a fixed value ͑Ӎ60 GPa͒ of the TOEC combination C 3 ϭ(1/8))(3C 112 Ϫ2C 123 ϪC 111 ), which is the relevant combination for the shear mechanisms leading the bcc structure to the close-packed martensite. By means of a Landau model for elastic phase transitions, the value of C 3 has been estimated from the crystal structure of the martensitic phase. The value obtained conforms reasonably with that found experimentally. ͓S0163-1829͑99͒04001-1͔