Assuming you would remove the carpet first, you could use construction adhesive or a finish nailer with t-nails, there is plywood underneath, probably 5/8 inch thick. However there are several concerns. The plywood is attached to the steel frame with special hardened nails and as there is some flex in the frame, the plywood moves as well. Also, the front wall of the closet is not attached to the closet floor in any way, in fact you probably can slip you fingers down between the carpeted floor and the front wall to verify. Anyway, neither method is likely to keep the cedar firmly attached or provide a tight seal against the wall. If you can get cedar strips a full 8ft wide and/or T&G, you may install them like laminate flooring, i.e. floating and secure them with moldings at the sides only.
Texas Baptist Men-Retiree Builders member since '01
13 Silverado 3500HD D/A, 2wd CCSB srw, custom RKI bed
11 Cruiser CF32MK