how can I fix xcode compiling everything all the time?

偶尔善良 提交于 2019-12-05 11:44:05

Many (most?) build systems use the last-modified date and time of the files to determine whether a recompilation needs to be performed. I would first verify that the file dates are behaving as expected; if the files are on a network drive, for example, there could be different time settings or clock discrepancies that would make it appear that the files were modified in the future, so the build system always compiles them. For that matter, if they are on a network drive, the protocol used may not include modified date, and the system simply defaults it to "now," so it always looks like every file was just modified.

You saved some files, then operating system has synchronized your system time backward. Those files are now detected to be modified in the future. You should execute following bash command in your project main folder:

find . -exec touch {} \;

My experience is that it recompiles stuff that's changed and stuff that depends on the stuff that's changed. So if you're editing a .h file that gets #import'd into every other file, then naturally everything will need to get recompiled. However, if you're only editing a .m file, then only the .m should be getting recompiled. I'm unaware of any Xcode setting that would change this behavior.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!