-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
CMakeLists.txt
51 lines (39 loc) · 963 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 3.24)
message(STATUS "Configuring Bun")
list(APPEND CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake
${CMAKE_SOURCE_DIR}/cmake/targets
${CMAKE_SOURCE_DIR}/cmake/tools
${CMAKE_SOURCE_DIR}/cmake/analysis
${CMAKE_SOURCE_DIR}/cmake/scripts
)
include(Policies)
include(Globals)
# --- Compilers ---
if(CMAKE_HOST_APPLE)
include(SetupMacSDK)
endif()
include(SetupLLVM)
include(SetupCcache)
# --- Project ---
parse_package_json(VERSION_VARIABLE DEFAULT_VERSION)
optionx(VERSION STRING "The version of Bun" DEFAULT ${DEFAULT_VERSION})
project(Bun VERSION ${VERSION})
include(Options)
include(CompilerFlags)
# --- Tools ---
include(SetupGit)
include(SetupBuildkite)
include(SetupBun)
include(SetupEsbuild)
include(SetupZig)
include(SetupRust)
# --- Targets ---
include(BuildBun)
# --- Analysis ---
if(ENABLE_ANALYSIS)
include(RunClangFormat)
include(RunClangTidy)
include(RunZigFormat)
include(RunPrettier)
endif()