Only build and test apps if the user has enabled WITH_APPS

Users setting WITH_APPS=OFF encounter errors in the current configuration.