-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmake] Make unittests build with swift-testing using CMake.
- Loading branch information
Showing
5 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.DS_Store | ||
/.build | ||
/build | ||
/b | ||
/Packages | ||
xcuserdata/ | ||
DerivedData/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
SwiftTesting_GenerateDerivedSources() | ||
message(STATUS "swiftwebdriver_SwiftTesting_Sources: ${swiftwebdriver_SwiftTesting_Sources}") | ||
message(STATUS "SwiftTesting_TestingMacrosPath: ${SwiftTesting_TestingMacrosPath}") | ||
|
||
add_library(TestsCommon | ||
Common/PNGUtilities.swift) | ||
|
||
add_executable(SwiftWebdriverPackageTests | ||
UnitTests/APITests.swift | ||
UnitTests/MockWebDriver.swift | ||
${swiftwebdriver_SwiftTesting_Sources}) | ||
set_target_properties(SwiftWebdriverPackageTests PROPERTIES | ||
SUFFIX .swift-testing) | ||
target_link_libraries(SwiftWebdriverPackageTests PRIVATE | ||
WebDriver | ||
Testing | ||
TestingInternals | ||
TestsCommon) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include(FetchContent) | ||
|
||
# Ignore warnings from dependencies' source code. | ||
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:-suppress-warnings>) | ||
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:-suppress-remarks>) | ||
|
||
if(BUILD_TESTING AND SWIFT_WEBDRIVER_USE_SWIFT_TESTING) | ||
include(SwiftTesting.cmake) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FetchContent_Declare(SwiftTesting | ||
# GIT_REPOSITORY https://github.com/apple/swift-testing.git | ||
# GIT_TAG e07ef28413b5be951fa5672b290bc10fa2e3cd65) | ||
GIT_REPOSITORY https://github.com/thebrowsercompany/swift-testing.git | ||
GIT_TAG a191e1d53eee05a3dbe2447ca10bab0a617fad82) | ||
FetchContent_GetProperties(SwiftTesting) | ||
if(NOT SwiftTesting_POPULATED) | ||
message(STATUS "syncing SwiftTesting") | ||
FetchContent_MakeAvailable(SwiftTesting) | ||
endif() |