Skip to content

Commit b98b771

Browse files
committed
build: Fix building TestFoundation in Xcode
- TestFoundation needs SwiftXCTest and SwiftXCTest needs SwiftFoundation, so this allows xctest to find the framework.
1 parent 2e0aedc commit b98b771

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

XCTest.xcodeproj/project.pbxproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,10 @@
473473
buildSettings = {
474474
DEFINES_MODULE = YES;
475475
DYLIB_INSTALL_NAME_BASE = "@rpath";
476-
"FRAMEWORK_SEARCH_PATHS[sdk=macosx*]" = $BUILT_PRODUCTS_DIR;
476+
"FRAMEWORK_SEARCH_PATHS[sdk=macosx*]" = (
477+
$BUILT_PRODUCTS_DIR,
478+
"../swift-corelibs-foundation/build/Debug",
479+
);
477480
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
478481
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
479482
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks @loader_path/Frameworks";
@@ -482,6 +485,7 @@
482485
"-framework",
483486
SwiftFoundation,
484487
);
488+
OTHER_SWIFT_FLAGS = "-swift-version 3";
485489
PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK;
486490
SKIP_INSTALL = YES;
487491
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator";
@@ -506,6 +510,7 @@
506510
"-framework",
507511
SwiftFoundation,
508512
);
513+
OTHER_SWIFT_FLAGS = "-swift-version 3";
509514
PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK;
510515
SKIP_INSTALL = YES;
511516
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator";

XCTest.xcodeproj/xcshareddata/xcschemes/SwiftXCTest.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0830"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "NO"

XCTest.xcodeproj/xcshareddata/xcschemes/SwiftXCTestFunctionalTests.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0830"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "NO"

0 commit comments

Comments
 (0)