mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
Fix make test_SPM by backporting 7adfb3c233fc3fdeacbb3933d7d13b4c2a3a2eed and using the default Swift compiler unless TOOLCHAIN is defined
This commit is contained in:
1 parent
43c96803be
commit
e974cd4b33
1 file changed
+19
-1
@@ -22,7 +22,7 @@ CARTHAGE := $(shell command -v carthage)
|
||||
GIT := $(shell command -v git)
|
||||
JAZZY := $(shell command -v jazzy)
|
||||
POD := $(shell command -v pod)
|
||||
SWIFT := $(shell command -v swift)
|
||||
XCRUN := $(shell command -v xcrun)
|
||||
XCODEBUILD := set -o pipefail && $(shell command -v xcodebuild)
|
||||
|
||||
# Xcode Version Information
|
||||
@@ -74,6 +74,24 @@ ifdef XCPRETTY_PATH
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef TOOLCHAIN
|
||||
# If TOOLCHAIN is specified, add xcodebuild parameter
|
||||
XCODEBUILD += -toolchain $(TOOLCHAIN)
|
||||
|
||||
# If TOOLCHAIN is specified, get the location of the toolchain’s SWIFT
|
||||
TOOLCHAINSWIFT = $(shell $(XCRUN) --toolchain '$(TOOLCHAIN)' --find swift 2> /dev/null)
|
||||
ifdef TOOLCHAINSWIFT
|
||||
# Update the SWIFT path to the toolchain’s SWIFT
|
||||
SWIFT = $(TOOLCHAINSWIFT)
|
||||
else
|
||||
@echo Cannot find `swift` for specified toolchain.
|
||||
@exit 1
|
||||
endif
|
||||
else
|
||||
# If TOOLCHAIN is not specified, use standard Swift
|
||||
SWIFT = $(shell $(XCRUN) --find swift 2> /dev/null)
|
||||
endif
|
||||
|
||||
# We test framework test suites, and if GRBD can be installed in an application:
|
||||
test: test_framework test_install
|
||||
|
||||
|
||||
Reference in new issue
Block a user