-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add an initial CMake based build system for DocC
Using this (along with its dependencies) allows us to significantly reduce the build times for the Swift toolchain (~7% of the overall build time in local testing).
- Loading branch information
Showing
5 changed files
with
585 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#[[ | ||
This source file is part of the swift-format open source project | ||
|
||
Copyright (c) 2024 Apple Inc. and the DocC project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
|
||
See https://swift.org/LICENSE.txt for license information | ||
#]] | ||
|
||
cmake_minimum_required(VERSION 3.24) | ||
|
||
project(docc | ||
LANGUAGES Swift) | ||
|
||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift) | ||
set(CMAKE_Swift_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY MultiThreadedDLL) | ||
|
||
include(GNUInstallDirs) | ||
|
||
find_package(ArgumentParser CONFIG) | ||
find_package(SwiftCrypto CONFIG) | ||
find_package(SwiftMarkdown CONFIG) | ||
find_package(LMDB CONFIG) | ||
find_package(SymbolKit CONFIG) | ||
find_package(cmark-gfm CONFIG) | ||
|
||
add_subdirectory(Sources) |
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,13 @@ | ||
#[[ | ||
This source file is part of the swift-format open source project | ||
|
||
Copyright (c) 2024 Apple Inc. and the DocC project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
|
||
See https://swift.org/LICENSE.txt for license information | ||
#]] | ||
|
||
add_subdirectory(SwiftDocC) | ||
add_subdirectory(SwiftDocCUtilities) | ||
add_subdirectory(docc) | ||
|
Oops, something went wrong.