How to Use The `$ swift build -C` Option πŸ’ƒ #swiftlang

The Swift Package Manager has some options.

You can see the usage using `$ swift build --help` command.

The `-C`option makes `$ swift build` available for your project in another directory.

β€” chdir <value> Change working directory before any other operation [-C]


Let's suppose your current directory is not the root of your project.

To build your project with `$ swift build`, run the following command in the current directory.

$ swift build -C <PathToRootOfYourProject>

You don't need to run `$ cd <PathToRootOfYourProject>` command. πŸ˜‡