swiftlang / swiftlang/swift-syntax

Setting of Swift_MODULE_DIRECTORY (and probably other directories) inappropriate.

Open
#2,680 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
3.7k
Forks
553
Avg merge
5d 13h
Merged PRs (30d)
16

Description

https://github.com/apple/swift-syntax/blob/e072677b26ad9a46b15f59fa2b5d7edf4f808e4f/cmake/modules/AddSwiftHostLibrary.cmake#L69-L71

See [this warning](https://cmake.org/cmake/help/latest/prop_tgt/Swift_MODULE_DIRECTORY.html#swift-module-directory), 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](https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html#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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.