Add CMake tests.

Task-number: QTBUG-41445
Change-Id: I8fb0eca0f38d38d8bdd6540c2c66cc4c62523848
Reviewed-by: Stephen Kelly <steveire@gmail.com>