-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
45 lines (36 loc) · 997 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
# Copyright (C) 2019-2024 Tautvydas Povilaitis (belijzajac)
# SPDX-License-Identifier: GPL-3.0
cmake_minimum_required(VERSION 3.25.1)
project(WisniaLang)
add_compile_definitions(WISNIA_VERSION="1.0.4-dev")
option(UNIT_TESTS "Build unit tests" OFF)
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
set(UNIT_TESTS ON)
endif()
# We're using C++20
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Locate CMake helper modules
list(APPEND CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/cmake
)
# Include the said modules
include(Dependencies)
# In order to have shorter paths to header files
# Defined here because unit tests need to access them too
include_directories(
src/utilities/
src/frontend/basic/
src/frontend/ast/
src/frontend/lexer/
src/frontend/parser/
src/frontend/sema/
src/backend/intermediate/
src/backend/register/
src/backend/optimize/
src/backend/elf/
src/backend/codegen/
)
add_subdirectory(src)
add_subdirectory(tests)
add_subdirectory(coverage)