mirror of
https://github.com/apple/swift-log
synced 2026-11-30 04:18:44 +00:00
add license headers and set BUILD_TESTING to OFF by default
This commit is contained in:
1 parent
682b17f46a
commit
72b7aed885
9 files changed
+139
-5
No files matched your search
+15
-1
@@ -1,10 +1,24 @@
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#===----------------------------------------------------------------------===#
|
||||
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
|
||||
# Enable C and Swift languages
|
||||
project(swift-log
|
||||
LANGUAGES C Swift)
|
||||
|
||||
option(BUILD_TESTING "Build testing targets" ON)
|
||||
option(BUILD_TESTING "Build testing targets" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries by default" YES)
|
||||
|
||||
set(CMAKE_Swift_LANGUAGE_VERSION 6)
|
||||
|
||||
@@ -1,2 +1,16 @@
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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(Logging)
|
||||
add_subdirectory(InMemoryLogging)
|
||||
@@ -1,3 +1,17 @@
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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(InMemoryLogging
|
||||
"InMemoryLogHandler.swift"
|
||||
)
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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(Logging
|
||||
"Handlers/MultiplexLogHandler.swift"
|
||||
"Handlers/StreamLogHandler.swift"
|
||||
|
||||
@@ -1,2 +1,16 @@
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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)
|
||||
@@ -1,3 +1,17 @@
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#===----------------------------------------------------------------------===#
|
||||
|
||||
if(APPLE)
|
||||
add_library(InMemoryLoggingTests MODULE
|
||||
InMemoryLogHandlerTests.swift)
|
||||
@@ -10,8 +24,12 @@ else()
|
||||
endif()
|
||||
|
||||
target_compile_options(InMemoryLoggingTests PRIVATE
|
||||
${SWIFT_LOG_COMMON_COMPILE_OPTIONS}
|
||||
"SHELL:-plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing")
|
||||
${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
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#===----------------------------------------------------------------------===#
|
||||
|
||||
if(APPLE)
|
||||
add_library(LoggingTests MODULE
|
||||
CompatibilityTest.swift
|
||||
@@ -40,8 +54,12 @@ else()
|
||||
endif()
|
||||
|
||||
target_compile_options(LoggingTests PRIVATE
|
||||
${SWIFT_LOG_COMMON_COMPILE_OPTIONS}
|
||||
"SHELL:-plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing")
|
||||
${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
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#===----------------------------------------------------------------------===#
|
||||
|
||||
if(NOT TARGET Logging)
|
||||
include(@SwiftLog_EXPORTS_FILE@)
|
||||
endif()
|
||||
@@ -1,4 +1,18 @@
|
||||
|
||||
#===----------------------------------------------------------------------===#
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#===----------------------------------------------------------------------===#
|
||||
|
||||
# Returns the os name in a variable
|
||||
#
|
||||
# Usage:
|
||||
|
||||
Reference in new issue
Block a user