Set the CMP0156 and CMP0179 policies to NEW. CMP0156 de-duplicates libraries on link lines based on linker capabilities; CMP0179 makes this de-duplication keep the first occurrence of static libraries. This silences Apple linker "ignoring duplicate libraries" warnings.
Both policies are gated on CMP0179, which requires CMake >=3.31, to avoid the intermediate CMake 3.29/3.30 behaviour where only CMP0156 is available. This requirement is satisfied by the current Homebrew package and the Guix build environment. On older versions, the policy guard makes this a no-op.
The Guix scripts for macOS have been updated to turn linker warnings into errors, as is done for other targets.