This is not a CMake issue, but people may open issues in projects using CMake as the new linker in AppleClang 15 is causing ld link warnings and errors. This may occur for try_compile, check_source_compiles and similar and when building as usual. This same issue occurs when building by hand, with Make, Autotools, etc. as it’s the new fussier linker, NOT CMake that’s the issue.
The workaround as suggested by Apple is for users to set environment variable LDFLAGS=-Wl,-ld_classic
In general the CMake-using projects need to update their CMakeLists.txt to deal with whatever obsolete/incorrect flags are emitted by their options.
For example, this new linker impacts OpenMPI on macOS as their mpif90 -show
emits a linker flag not compatible with AppleClang 15.