[CMake] Set -Wno-deprecated-declarations for tests

CPPUNIT uses auto_ptr which is deprecated and generates a lot of
warnings that we don't care about.