apple / apple/swift-argument-parser

CMake: Use of `CMAKE_Swift_MODULE_DIRECTORY` breaks Xcode and Ninja Multi-Config generators

Open
#659 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
3.8k
Forks
411
Avg merge
7d 14h
Merged PRs (30d)
15

Description

Please see the warning [here](https://cmake.org/cmake/help/latest/prop_tgt/Swift_MODULE_DIRECTORY.html#prop_tgt:Swift_MODULE_DIRECTORY). As it stands if you want to generate a working Xcode project that uses ArgumentParser from CMake, you're out of luck.

[These changes](https://github.com/hylo-lang/CMakeModules/blob/main/patches/swift-argument-parser.patch) modernize the use of CMake by eliminating potentially problematic consolidation of output directories across dependent projects, and work around Swift bug swiftlang/swift#72841.

**ArgumentParser version:** the `main` branch

Contributor guide

Open the contributing guide

Research direction

Start by reading the CMAKE_Swift_MODULE_DIRECTORY warning and the linked swift-argument-parser.patch, then reproduce generation with the Xcode and Ninja Multi-Config generators. Done means ArgumentParser produces working projects with those generators without the problematic output-directory consolidation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, swift
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.