how can I fix xcode compiling everything all the time?
Asked Answered
C

3

5

I've started to use XCode and it seems to work, well, most of it.

The annoying thing is it compiles all the source files, even those that didn't change, each and every time.

I'm getting the grips with openframeworks and I waste time compiling the openframeworks source files every time although they don't change.

Here are my IDE and machine details:

XCode Version 3.1.2 Component versions Xcode IDE: 1149.0 Xcode Core: 1148.0 ToolSupport: 1102.0

Mac OS X Version 10.5.6

Has any one experienced the same problem ? Any workarounds ?

Crissie answered 5/11, 2009 at 10:50 Comment(1)
More of a programming question this.Hideous
C
3

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.

Concourse answered 5/11, 2009 at 17:50 Comment(1)
Thanks qid, that seemed to be the issue! Don't know why it hasn't crossed my mind.Crissie
A
9

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 {} \;
Anticathexis answered 21/8, 2011 at 13:47 Comment(1)
touch kann be used with multiple files, so + instead of \; would work too.Solidago
C
3

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.

Concourse answered 5/11, 2009 at 17:50 Comment(1)
Thanks qid, that seemed to be the issue! Don't know why it hasn't crossed my mind.Crissie
K
0

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.

Keratitis answered 5/11, 2009 at 17:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.