Re: How to eliminate a target's automatic framework search setting
Re: How to eliminate a target's automatic framework search setting
- Subject: Re: How to eliminate a target's automatic framework search setting
- From: Christiaan Hofman <email@hidden>
- Date: Mon, 28 Jun 2010 12:07:04 +0200
On Jun 28, 2010, at 3:08, Tron Thomas wrote:
> Okay here's what is going on:
>
> I am using test driven development for the project. A certain module runs in an application that uses frameworks built in the project. This means the module has code to pull in header files from the frameworks.
>
> This same module is also placed into a test application. To isolate the module the test application does not use the frameworks and instead provides a mock versions of things that would be used in the frameworks, and tries to provide its own version of the header files that would be available in the frameworks by configuring the search path for the test application to find different header files.
>
> However, because Xcode insist on adding a framework search path for every target, regardless of whether that target actually uses any frameworks at all, the test application is pulling in the framework header files when it shouldn't.
>
I think a better way to do this is for the test app to have a mock version of the frameworks with the exact same headers, but perhaps non-working implementations when you don't need something. Then it doesn't matter where the compiler gets the headers from, it only matters where the runtime gets the framework. That's essentially what SDKs do, because the compiler generally just sees stub versions of the system frameworks. As for linking, I seem to recall you can set the particular path for specific frameworks to link to.
> Now that I have explained the situation, how do I eliminate the framework search path from my test application?
>
That was already answered in my first reply: AFAICS you can't.
Christiaan
> On 06/27/2010 02:38 PM, Christiaan Hofman wrote:
>> On Jun 27, 2010, at 23:29, Tron Thomas wrote:
>>
>>
>>> It very much is a problem. All targets build to one location. This means all the frameworks that are built for the project end up in that directory. All frameworks are built before applications so the frameworks will always be there when the application that doesn't want to use them needs to build.
>>>
>>>
>> I still do not see what's the problem. If you have some framework there that the app doesn't use that's not a problem, it's just ignored. So what?
>>
>> Christiaan
>>
>>
>>> It seems like someone should be able to disable this setting. There doesn't seem to be a reason why this setting must always exists, and in this case it is causing a problem.
>>>
>>> On 06/27/2010 01:27 PM, Christiaan Hofman wrote:
>>>
>>>> On Jun 27, 2010, at 17:57, Tron Thomas wrote:
>>>>
>>>>
>>>>
>>>>> Whenever someone creates a project in Xcode 3.2.1, Xcode configures the targets in a project with a flag that searches for available frameworks in the project's build location.
>>>>>
>>>>> For example, if someone named John creates a project in his home directory, the build output for compiling a module in the project will contain a switch like the following:
>>>>> -F/Users/john/MyProject/build/Debug
>>>>>
>>>>> This setting shows up automatically, and there does not appear to be any way to modify it in the settings options for the project, target, or module. The obvious setting (Framework Search Paths) is initially blank for a new project.
>>>>>
>>>>> This setting can be problematic for a project that builds multiple targets all in the same location, some of which might use frameworks that exist in the specified path and others that want to use other header files that are specified in a similar way, yet exist outside the frameworks.
>>>>>
>>>>> How can someone eliminate this framework search setting from a target in an Xcode project?
>>>>>
>>>>>
>>>>>
>>>> I don't think you can remove that one. On the other hand I also don't see why this would be a problem, because the folder should always exist, and it's just a search path, i.e. a place where frameworks MAY be, not where they MUST be.
>>>>
>>>> Christiaan
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>
_______________________________________________
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