简体   繁体   中英

Achieving a preprocessor in Xcode 9?

How, really, would you mod Xcode to include preprocessing on all scripts - in modern Xcode (ie 9+)?

Obviously this was trivial in the Old Days.

Would one basically be using a custom build rule ?

.

在此处输入图片说明

.

Or perhaps, would you need basically "A Mac App" which runs (how?) before the compile?

It depends on what you want the preprocessor to do. Assuming that the output files are regular .c, .m, .cpp etc. files that the compiler can handle correctly then you could simply add a new 'Run Script' build phase to run your pre-processor. It has access to the Xcode environment variables so should be able to run effectively. As Nik Kit said though, it depends on exactly what you want to achieve.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM