• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode 3.1.1 build dependency analysis ignoring distant includes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 3.1.1 build dependency analysis ignoring distant includes


  • Subject: Re: Xcode 3.1.1 build dependency analysis ignoring distant includes
  • From: Chris Espinosa <email@hidden>
  • Date: Wed, 24 Sep 2008 09:16:19 -0700

On Sep 23, 2008, at 6:49 PM, John Gee wrote:

I am using Xcode 3.1.1. I have some projects where a clean is sometimes needed to force a build, and think the problem is that the dependency analysis is ignoring distant included files. Editing files several steps removed from the files listed in the project does not trigger a recompile. I have reproduced this in a new test project using the Carbon C++ Application template.

Are there any known dependency problems and/or work-arounds? I searched the list and saw that there were some known problems with older versions of Xcode and using "../" in include paths, but did not see any current issues. I found that adding all of the headers to the project did mean changes caused a recompile, but this is not a feasible work-around for every project I have. Adding the subfolder to the include paths is a better work-around which fixes the dependency analysis, although it increases the risk of file name clashes.

MainFolder
project
main.cp: #include "a.h"
OtherFolder
a.h: #include "SubFolder/b.h"
SubFolder
b.h: #include "c.h"
c.h: #include "d.h"
d.h: #include "e.h"
e.h: #include "f.h"
f.h: #include "g.h"
g.h: #include "h.h"
h.h

The project specifies "../OtherFolder" as a user include folder (and not recursive).
None of the files from OtherFolder are explicitly in the project.
I am doing a Build from inside Xcode.

Touching a.h causes a recompile.
Touching b.h causes a recompile.
Touching c.h does not cause a recompile. (And the items further in the chain are also ignored.)

(I tried using "gcc -MM" on the command line, and it does list the full chain of files.)

This looks like Xcode's dependency checker is looking in only the defined header search paths and the directory containing the current source file, where gcc also looks in the directory containing the current header file (per Search Path - The C Preprocessor).

A workaround is to specify $(SRCROOT)/OtherFolder/SubFolder as user header search path.

If you file a Radar bug at http://bugreporter.apple.com, please refer to related bug 5502805.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode 3.1.1 build dependency analysis ignoring distant includes
      • From: John Gee <email@hidden>
References: 
 >Xcode 3.1.1 build dependency analysis ignoring distant includes (From: John Gee <email@hidden>)

  • Prev by Date: Re: Find no longer working
  • Next by Date: Re: Xcode subversion
  • Previous by thread: Xcode 3.1.1 build dependency analysis ignoring distant includes
  • Next by thread: Re: Xcode 3.1.1 build dependency analysis ignoring distant includes
  • Index(es):
    • Date
    • Thread