用自定义进程替换 Xcode 的预处理器

发布于 2024-08-09 04:12:22 字数 314 浏览 11 评论 0原文

我需要在预处理器尝试之前查看 Xcode 将编译的文件。简而言之,我需要在预处理器前面添加一个预处理器。

当涉及到如何在修改“C 源文件”的构建规则后运行基于 C 的文件的默认 Xcode 构建过程的详细信息时,所有 Google 搜索都让我一无所获。 Xcode 似乎调用了一个名为“CompileC”的进程(shell 脚本?巫术圣歌?),但在完成源文件后我找不到它来自己调用它。

有什么想法吗?出于好奇,我需要在非常特定的情况下修改某些宏(例如,取决于源文件的名称或构建日期)。似乎没有一个聪明的方法可以做到:#ifdef filename =“bobsyeruncle.m”

I have a need to look at the files Xcode will compile before the preprocessor gets a stab at them. In short, I need to stick a preprocessor in front of the preprocessor.

All the Google searching has netted me nada when it comes to details on how to run the default Xcode build process for C-based files after modifying the build rule for "C source files". Xcode seems to call a process (shell script? voodoo chant?) called "CompileC" but I cannot find it to call it myself after I'm done with the source file.

Any ideas? For the curious, I need to modify certain macros in very specific situations (depending on the source file's name or the build date, for example). And there doesn't appear to be a clever way to do: #ifdef filename="bobsyeruncle.m"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文