remove CMake testing targets

This commit is contained in:
mitras-git committed 2026-07-19 09:35:51 -04:00
1 parent 1074ac8725
commit 4a8110809e
4 files changed
-103

No files matched your search

-5
View File
@@ -18,7 +18,6 @@ cmake_minimum_required(VERSION 3.19)
project(swift-log
LANGUAGES C Swift)
option(BUILD_TESTING "Build testing targets" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries by default" YES)
set(CMAKE_Swift_LANGUAGE_VERSION 6)
@@ -48,7 +47,6 @@ if(MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
include(CTest)
include(GNUInstallDirs)
include(SwiftSupport)
@@ -58,8 +56,5 @@ if(NOT APPLE)
endif()
add_subdirectory(Sources)
if(BUILD_TESTING)
add_subdirectory(Tests)
endif()
add_subdirectory(cmake/modules)
-16
View File
@@ -1,16 +0,0 @@
#===----------------------------------------------------------------------===#
#
# This source file is part of the Swift Logging API open source project
#
# Copyright (c) 2018-2026 Apple Inc. and the Swift Logging API project authors
# Licensed under Apache License v2.0
#
# See LICENSE.txt for license information
# See CONTRIBUTORS.txt for the list of Swift Logging API project authors
#
# SPDX-License-Identifier: Apache-2.0
#
#===----------------------------------------------------------------------===#
add_subdirectory(LoggingTests)
add_subdirectory(InMemoryLoggingTests)
-33
View File
@@ -1,33 +0,0 @@
#===----------------------------------------------------------------------===#
#
# This source file is part of the Swift Logging API open source project
#
# Copyright (c) 2018-2026 Apple Inc. and the Swift Logging API project authors
# Licensed under Apache License v2.0
#
# See LICENSE.txt for license information
# See CONTRIBUTORS.txt for the list of Swift Logging API project authors
#
# SPDX-License-Identifier: Apache-2.0
#
#===----------------------------------------------------------------------===#
add_library(InMemoryLoggingTests
InMemoryLogHandlerTests.swift)
target_compile_options(InMemoryLoggingTests PRIVATE
${SWIFT_LOG_COMMON_COMPILE_OPTIONS})
if(APPLE)
target_compile_options(InMemoryLoggingTests PRIVATE
"SHELL:-plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing")
endif()
if(APPLE)
find_library(TESTING_FRAMEWORK Testing
PATHS "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks"
NO_DEFAULT_PATH)
target_link_libraries(InMemoryLoggingTests PRIVATE InMemoryLogging Logging ${TESTING_FRAMEWORK})
else()
target_link_libraries(InMemoryLoggingTests PRIVATE InMemoryLogging Logging Testing)
endif()
-49
View File
@@ -1,49 +0,0 @@
#===----------------------------------------------------------------------===#
#
# This source file is part of the Swift Logging API open source project
#
# Copyright (c) 2018-2026 Apple Inc. and the Swift Logging API project authors
# Licensed under Apache License v2.0
#
# See LICENSE.txt for license information
# See CONTRIBUTORS.txt for the list of Swift Logging API project authors
#
# SPDX-License-Identifier: Apache-2.0
#
#===----------------------------------------------------------------------===#
add_library(LoggingTests
CompatibilityTest.swift
GlobalLoggingTest.swift
LocalLoggingTest.swift
LockTest.swift
LogEventTest.swift
LoggingTest.swift
MDCTest.swift
MetadataAttributesTest.swift
MetadataProviderTest.swift
MetadataValueInterpolationTest.swift
StreamLogHandlerTest.swift
SwiftLogNoOpLogHandlerTest.swift
TaskLocalLoggerTest.swift
TestLogger.swift
TestSendable.swift
SubDirectoryOfLoggingTests/EmitALogFromSubDirectory.swift)
target_compile_options(LoggingTests PRIVATE
${SWIFT_LOG_COMMON_COMPILE_OPTIONS})
if(APPLE)
target_compile_options(LoggingTests PRIVATE
"SHELL:-plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing")
endif()
if(APPLE)
find_library(TESTING_FRAMEWORK Testing
PATHS "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks"
NO_DEFAULT_PATH)
target_link_libraries(LoggingTests PRIVATE Logging ${TESTING_FRAMEWORK})
else()
target_link_libraries(LoggingTests PRIVATE Logging Testing)
endif()