xcconfig file - 设置带前导空格的变量值?

Wil*_*sch 2 unix xcode xcconfig

假设我想将环境变量BAR的值定义为"foo",而不是引号.如果我的.xcconfig文件有该行

BAR = foo
Run Code Online (Sandbox Code Playgroud)

这将把它设置为"foo".如果它有线就一样

BAR =  foo
Run Code Online (Sandbox Code Playgroud)

有办法做我想要的吗?

Wil*_*sch 7

我找到了一种方法:

EMPTY_STRING =
BAR = $(EMPTY_STRING) foo // the empty string protects leading space.
Run Code Online (Sandbox Code Playgroud)

  • BAR = $() foo 具有相同的结果。不需要定义额外的变量 (2认同)