Xcode: CMake fails to find Swift compiler with Xcode 14.3
Apple released Xcode 14.3 yesterday and upon reconfiguring my project, CMake wasn't able to find the Swift compiler anymore.
The subproject uses project(<name> LANGUAGES Swift)
to mark it explicitly as a Swift language project.
Detection fails with the following error:
-- The Swift compiler identification is Apple
Called from: [3] /opt/homebrew/Cellar/cmake/3.26.2/share/cmake/Modules/CMakeDetermineCompilerId.cmake
[2] /opt/homebrew/Cellar/cmake/3.26.2/share/cmake/Modules/CMakeDetermineSwiftCompiler.cmake
[1] <path_to>/CMakeLists.txt
CMake Error at <path_to>/CMakeLists.txt:16 (project):
No CMAKE_Swift_COMPILER could be found.