【发布时间】:2020-09-01 13:39:23
【问题描述】:
似乎 xcodebuild 将所有内容打印到标准输出。
$ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project test.xcodeproj build -target test -configuration Debug -jobs 3 2>err
# xcodebuild stdout with bunch of warnings and errors
$ cat err
** BUILD FAILED **
The following build commands failed:
CompileC _build/test.build/Objects-normal/x86_64/test.o /Users/me/test/test.cpp normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
这不会让我的 IDE(QtCreator) 正确解析输出。
实际上,clang 会向 stderr 打印错误和警告。但是 xcodebuild 出于某种原因将所有内容重定向到 strdout。除了1>&2,有没有办法让xcodebuild向stderr打印错误和警告?
【问题讨论】:
标签: xcode compilation qt-creator xcodebuild