Skip to content

build: add TSCSupport to the built module set #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries by default" YES)
find_package(dispatch QUIET)
find_package(Foundation QUIET)
find_package(Threads QUIET)
find_package(XCTest QUIET)

add_subdirectory(Sources)
add_subdirectory(cmake/modules)
1 change: 1 addition & 0 deletions Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ add_subdirectory(TSCclibc)
add_subdirectory(TSCLibc)
add_subdirectory(TSCBasic)
add_subdirectory(TSCUtility)
add_subdirectory(TSCTestSupport)
4 changes: 2 additions & 2 deletions Sources/TSCBasic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ target_link_libraries(TSCBasic PRIVATE
TSCLibc)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
if(Foundation_FOUND)
target_link_libraries(TSCBasic PUBLIC
Foundation)
target_link_directories(TSCBasic PRIVATE
$<TARGET_LINKER_FILE_DIR:Foundation>)
endif()
endif()
target_link_libraries(TSCBasic PRIVATE
Expand Down
32 changes: 32 additions & 0 deletions Sources/TSCTestSupport/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors

add_library(TSCTestSupport
AssertMatch.swift
DiagnosticsEngine.swift
FileSystemExtensions.swift
JSONExtensions.swift
misc.swift
Product.swift
PseudoTerminal.swift
XCTAssertHelpers.swift
XCTestCasePerf.swift)
target_link_libraries(TSCTestSupport PUBLIC
TSCBasic
TSCLibc
TSCUtility)
if(NOT APPLE)
if(Foundation_FOUND)
target_link_libraries(TSCTestSupport PRIVATE
Foundation)
endif()
if(XCTest_FOUND)
target_link_libraries(TSCTestSupport PRIVATE
XCTest)
endif()
endif()
4 changes: 2 additions & 2 deletions Sources/TSCUtility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_directories(TSCUtility PRIVATE /usr/local/lib)
endif()
if(Foundation_FOUND)
target_link_libraries(TSCUtility PUBLIC
FoundationNetworking)
target_link_directories(TSCUtility PRIVATE
$<TARGET_LINKER_FILE_DIR:FoundationNetworking>)
endif()
endif()
# NOTE(compnerd) workaround for CMake not setting up include flags yet
Expand Down