I noticed a ccache: command not found error and this fixes that by checking the utility is available before running it.
removed incorrect brackets
Sorry to ping you @gkistanova; this one is a bit urgent though. Thanks!
Another person had made the same fix for the CMAKE_ARGS variable declaration, so this just adds a conditional to ccache. No longer an urgent issue.
This doesn't actually seem to affect buildbot's operations so the changes is not likely needed.