3

I want to use include-what-you-use with xcodebuild. The problem is when I do:

$ export CC=/path/to/include-what-you-use
$ xcodebuild

from command line, I get errors and build stops. I've read that a common way to use iwyu with make is to run make -k, so I want to use xcodebuild in a similar way. Is it possible? I found nothing about it in man xcodebuild.

4

1 回答 1

1

我能够找到一个简单的解决方案。我已经围绕 include-what-you-use 编写了一个包装脚本:

#!/bin/sh
/path-to-iwyu/include-what-you-use "$@"
exit 0

这不是一个很好的解决方案,但它确实有效。如果您知道更好的方法,请告诉我。

于 2013-09-16T11:03:58.647 回答