Skip to content

Commit 2781d9c

Browse files
committed
add SWIFT_BUILD_TESTS option for building Swift test packages
Add a SWIFT_BUILD_TESTS option to enable building tests, defaults to DEBUG_BUILD.
1 parent 6582074 commit 2781d9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

classes/swift.bbclass

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# avoid conflicts with meta-clang
22
TOOLCHAIN = "gcc"
33

4-
DEPENDS += "swift-native glibc gcc libgcc swift-stdlib libdispatch libfoundation"
4+
SWIFT_BUILD_TESTS ?= "${DEBUG_BUILD}"
5+
6+
DEPENDS += "swift-native glibc gcc libgcc swift-stdlib libdispatch swift-foundation"
7+
DEPENDS += "${@oe.utils.conditional('SWIFT_BUILD_TESTS', '1', 'swift-xctest swift-testing', '', d)}"
58

69
# Default build directory for SPM is "./.build"
710
# (see 'swift [build|package|run|test] --help')

0 commit comments

Comments
 (0)