Disable legacy build
In recent time several abstract classes were added. Their build was added to our current build system but they were not added to legacy build making legacy build non-working. Since legacy build has been deprecated in Release v22.06.22, we will make one more step towards its removal by throwing an error when user tries to run CMake for legacy build.