cmake generates compiler options not supported

While compiling ParaView 5.9, my cmake (v3.19.2) generates compilation options which my compiler does not support. How can I prevent that?

cd /run/user/1100/ParaView/ParaViewBuild/VTK/Wrapping/Python && /scratch/e1000/jfavre/cmake-build/bin/cmake -E cmake_link_script CMakeFiles/pvtkpython.dir/link.txt --verbose=1
/opt/cray/pe/craype/2.7.2/bin/CC -O2 -g -DNDEBUG -Xlinker --no-as-needed -Xlinker --unresolved-symbols=ignore-in-shared-libs CMakeFiles/pvtkpython.dir/vtkPythonAppInit.cxx.o -o …/…/…/bin/pvtkpython -Wl,-rpath,“$ORIGIN/…/lib64:/opt/cray/pe/python/3.8.5.0/lib” …/…/…/lib64/libvtkWrappingPythonCore3.8-pv5.9.so.5.9 …/…/…/lib64/libvtkPythonInterpreter-pv5.9.so.5.9 …/…/…/lib64/libvtkParallelMPI-pv5.9.so.5.9 /opt/cray/pe/python/3.8.5.0/lib/libpython3.8.so …/…/…/lib64/libvtkParallelCore-pv5.9.so.5.9 …/…/…/lib64/libvtkCommonCore-pv5.9.so.5.9 …/…/…/lib64/libvtksys-pv5.9.so.5.9 -ldl -Wl,-rpath-link,/run/user/1100/ParaView/ParaViewBuild/lib64
clang-10: error: unsupported option ‘–unresolved-symbols=ignore-in-shared-libs’

CMAKE_CXX_COMPILER:FILEPATH=/opt/cray/pe/craype/2.7.2/bin/CC
CMAKE_CXX_COMPILER_AR:FILEPATH=/opt/cray/pe/cce/10.0.4/cce-clang/x86_64/bin/llvm-ar
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/opt/cray/pe/cce/10.0.4/cce-clang/x86_64/bin/llvm-ranlib

TIA

Please file an issue on VTK’s issue tracker: https://gitlab.kitware.com/vtk/vtk/-/issues

I guess we’re a bit greedy about adding that flag.

Cc: @utkarsh.ayachit @cory.quammen Probably something to look at for 5.9.0.

I have a candidate fix here: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7482