try_compile: Slow NFS & Stale Handles
Hi,
What is the recommended workflow for compiling large CMake projects on slow file systems, such as NFS? NFS is prone to generate stale file handles when quickly removing and recreating files or whole directories.
CMake tends to remove files in its configure step and if I build complex CMake software on Summit/OLCF in $HOME then it's very likely (like 4 out of 5 CMake runs) that a stale NSF handle breaks the CMake configure step. This error usually occurs somewhere in configure output and is quickly overlooked by users, besides the non-zero return code.
Usually, this manifests with messages such as:
CMake Error: Remove failed on file: <...>/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_cd3a3.dir/.nfs000000000bc957410000590c: System Error: Device or resource busy
Is there a recommended workflow to e.g. provide a flag to create CMake temporaries directly in TmpFS?
Best, Axel