I've started experimenting with some conditional compilation. I have this working fine from xcode, but I'd like to get it working from the command line using the swift package manager.
I'm able to run swift build or swift test from the command line without issue. However, if I try:
swift -D DEBUG build
or even
swift -Onone build
I receive: :0: error: no such file or directory: 'build'
I only have the one version of swift installed. xcrun shows it pointing to the following toolchain:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
Ideas on what I may be doing wrong here?