swiftlang/swift-package-manager

Setting of Swift_MODULE_DIRECTORY (and probably other global directories) inappropriate.

Opened this issue · 0 comments

https://github.com/apple/swift-package-manager/blob/d98b7539cb141364577e6a4e27dbeb7fc5ccf75f/CMakeLists.txt#L23-L28

See this warning, which says that it's incompatible with multi-config generators. It also overrides a decision that should be the prerogative of the top level CMake project and if nothing else should be conditionalized on PROJECT_IS_TOP_LEVEL. But really it shouldn't be set at all. All of these settings artificially group files in a way that can cause builds to succeed even if dependencies have not been properly specified, or fail if properly specified, and if nothing else are likely to break all multi-config generators (which includes Xcode) for the forseeable future.