This repository has been archived by the owner on Dec 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (36 loc) · 1.5 KB
/
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
cmake_minimum_required(VERSION 3.0.0)
project(classicBasic VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 14)
if(CMAKE_BUILD_TYPE STREQUAL Debug AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
message(STATUS "Option fno-limit-debug-info has been added to CMAKE_CXX_FLAGS")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fno-limit-debug-info")
endif()
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
message(
WARNING "Vcpkg toolchain file undefined. "
"please add argument like:\n"
" -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake\n"
"For more information in https://github.com/Yoorkin/classicBasic/wiki/HowToBuild"
)
else()
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
include(${CMAKE_TOOLCHAIN_FILE})
endif()
file(GLOB CORE_INCLUDE
"${CMAKE_SOURCE_DIR}/compiler/compiler"
"${CMAKE_SOURCE_DIR}/compiler/core"
"${CMAKE_SOURCE_DIR}/compiler/antlr"
"${CMAKE_SOURCE_DIR}/compiler/JIT"
"${CMAKE_SOURCE_DIR}/compiler")
set(ANTLR_INCLUDE_DIRS
${ANTLR_INCLUDE}
${ANTLR_INCLUDE}/antlr4-runtime
${ANTLR_INCLUDE}/antlr4-runtime/atn
${ANTLR_INCLUDE}/antlr4-runtime/dfa
${ANTLR_INCLUDE}/antlr4-runtime/misc
${ANTLR_INCLUDE}/antlr4-runtime/support
${ANTLR_INCLUDE}/antlr4-runtime/tree
${ANTLR_INCLUDE}/antlr4-runtime/utf8)
add_subdirectory(runtime ${CMAKE_BINARY_DIR}/runtime)
add_subdirectory(compiler ${CMAKE_BINARY_DIR}/compiler)
add_subdirectory(test ${CMAKE_BINARY_DIR}/test)