Honor BUILD_TESTING
Only build tests if BUILD_TESTING is on
Differential Revision: https://phabricator.kde.org/D13944