According to this post, building itk 5.1.1 with gcc 10 is supported now. However, I failed to build it on ArchLinux, gcc 10.2.0. My cmake configuration:
cmake -B build -S "ITK-5.1.1" \
-DBUILD_TESTING=OFF \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
-DITK_BUILD_DEFAULT_MODULES=ON \
-DITK_USE_SYSTEM_DOUBLECONVERSION=ON \
-DITK_USE_SYSTEM_EIGEN=ON \
-DITK_USE_SYSTEM_EXPAT=ON \
-DITK_USE_SYSTEM_FFTW=ON \
-DITK_USE_SYSTEM_GDCM=ON \
-DITK_USE_SYSTEM_GOOGLETEST=ON \
-DITK_USE_SYSTEM_HDF5=ON \
-DITK_USE_SYSTEM_JPEG=ON \
-DITK_USE_SYSTEM_PNG=ON \
-DITK_USE_SYSTEM_TIFF=ON \
-DITK_USE_SYSTEM_ZLIB=ON \
-DITK_WRAP_PYTHON=ON
and here is the complete build log: itk-5.1.1-buildlog.txt (627.4 KB)
I could build it 5.1.1 with gcc8, gcc9 or clang. However, gcc8 and gcc9 will be removed once there is no package in the ArchLinux official repo depends on them.