mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 16:50:42 +00:00
NSBundle tests: fix framework linkage with older linkers
This commit is contained in:
parent
120e8f5294
commit
62cd15a74c
2 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../GenericTests/ -I../../..
|
||||
ADDITIONAL_OBJCFLAGS += -Wall
|
||||
|
||||
resources2_LDFLAGS += -Wl,-rpath -Wl,$(CURDIR)/Resources/TestFramework.framework/Versions/Current/$(GNUSTEP_TARGET_LDIR)
|
||||
resources2_LIB_DIRS += -L./Resources/TestFramework.framework/$(GNUSTEP_TARGET_LDIR)
|
||||
resources2_TOOL_LIBS += -lTestFramework
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
- (NSString*)test;
|
||||
@end
|
||||
|
||||
@interface TestFramework: NSObject
|
||||
@end
|
||||
|
||||
static void _testBundle(NSBundle* bundle, NSString* path, NSString* className)
|
||||
{
|
||||
|
@ -101,6 +103,10 @@ int main()
|
|||
END_SET("Bundle")
|
||||
|
||||
START_SET("Framework")
|
||||
/* This method call is required to ensure that the linker does not decide to
|
||||
* elide the framework linkage.
|
||||
*/
|
||||
[TestFramework class];
|
||||
bundle = [NSBundle bundleForClass: NSClassFromString(@"TestFramework")];
|
||||
path = [bundle bundlePath];
|
||||
_testBundle(bundle, path, @"TestFramework");
|
||||
|
|
Loading…
Reference in a new issue