[graphviz] How to generate dependency graph for larger monorepo projects when file names are too long?

We have a rather large CMake project for which we can configure/build just fine, but cannot generate graphviz for it due to the filenames being very long.

$ cmake -DATLAS_PACKAGE_FILTER_FILE=package_filters.txt -S columnar-athena/Projects/WorkDir -B build_graphviz --graphviz=/tmp/g.dot
...
Generate graphviz: /tmp/g.dot
CMake Error: Cannot open file for write: /tmp/g.dot.cvmfsatlas-nightlies.cern.chreposwmain_ColumnarAnalysis_x86_64-el9-gcc14-opt2026-01-10T2100ColumnarAnalysis25.2.49InstallAreax86_64-el9-gcc14-opt........AnalysisBaseExternals25.2.49InstallAreax86_64-el9-gcc14-optliblibROOTNTuple.so.dependers.tmp5ecc3

Can we configure or teach CMake to use a hash instead? If not, is there an alternative to being able to generate these dependency graphs?