CMAKE_INTERPROCEDURAL_OPTIMIZATION creates warnings with AppleClang
warning: (x86_64) /tmp/lto.o unable to open object file: No such file or directory Ass suggested here https://github.com/conda-forge/gdb-feedstock/pull/23/#issuecomment-643008755 adding -Wl,-object_path_lto,lto.o to LINK_FLAGS fixes the problem.