-
Notifications
You must be signed in to change notification settings - Fork 59
/
CMakeLists.txt
41 lines (33 loc) · 974 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
#
# Standard project boilerplate
#
cmake_minimum_required(VERSION 3.30)
project(Hylo
VERSION 0.1.0
DESCRIPTION "The Hylo programming language"
HOMEPAGE_URL "https://hylo-lang.org"
LANGUAGES C CXX Swift
)
enable_testing()
include(CTest)
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0")
list(PREPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
set(CMAKE_Swift_LANGUAGE_VERSION 5)
set(CMAKE_POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}) # Needed?
set(CMAKE_Swift_COMPILE_OPTIONS
-warnings-as-errors)
if(BUILD_TESTING)
list(APPEND CMAKE_Swift_COMPILE_OPTIONS -enable-testing)
endif()
if(BUILD_TESTING)
# We need to work something out, probably a DYLD_LIBRARY_PATH
# setting, before shared libs can be tested.
set(BUILD_SHARED_LIBS NO CACHE BOOL "Build shared libraries by default" FORCE)
endif()
if (PROJECT_IS_TOP_LEVEL)
include(cmake/TopLevelDefaults.cmake)
endif()
add_subdirectory(Sources)
if(BUILD_TESTING)
add_subdirectory(Tests)
endif()