In file 3_bidirectional_cxx_interop/cmake/modules/InitializeSwift.cmake using
set(SDK_FLAGS "-sdk" "${CMAKE_OSX_SYSROOT}")
But in cmake 4.0 CMAKE_OSX_SYSROOT is empty for MacOS target platform
From documentation:
Changed in version 4.0: The default is now empty. Previously a default was computed based on the CMAKE_OSX_DEPLOYMENT_TARGET or the host platform.
So if try build with cmake, build failed with error:
xcrun: error: argument to '--sdk' is missing