-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
76 lines (62 loc) · 2.1 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
project(
lemni-lang
DESCRIPTION "The Lemni programming language"
VERSION 0.1.0
LANGUAGES CXX C
)
include(ExternalProject)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options("-fconcepts")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options("-fconcepts")
endif()
set(LEMNI_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/include)
set(
LEMNI_HEADERS
${LEMNI_INCLUDE_DIR}/lemni/Macros.h
${LEMNI_INCLUDE_DIR}/lemni/Str.h
${LEMNI_INCLUDE_DIR}/lemni/Location.h
${LEMNI_INCLUDE_DIR}/lemni/Token.h
${LEMNI_INCLUDE_DIR}/lemni/lex.h
${LEMNI_INCLUDE_DIR}/lemni/Operator.h
${LEMNI_INCLUDE_DIR}/lemni/AInt.h
${LEMNI_INCLUDE_DIR}/lemni/AReal.h
${LEMNI_INCLUDE_DIR}/lemni/ARatio.h
${LEMNI_INCLUDE_DIR}/lemni/Expr.h
${LEMNI_INCLUDE_DIR}/lemni/parse.h
${LEMNI_INCLUDE_DIR}/lemni/Scope.h
${LEMNI_INCLUDE_DIR}/lemni/Interop.h
${LEMNI_INCLUDE_DIR}/lemni/Type.h
${LEMNI_INCLUDE_DIR}/lemni/TypedExpr.h
${LEMNI_INCLUDE_DIR}/lemni/typecheck.h
${LEMNI_INCLUDE_DIR}/lemni/Region.h
${LEMNI_INCLUDE_DIR}/lemni/memcheck.h
${LEMNI_INCLUDE_DIR}/lemni/Module.h
${LEMNI_INCLUDE_DIR}/lemni/Value.h
${LEMNI_INCLUDE_DIR}/lemni/mangle.h
${LEMNI_INCLUDE_DIR}/lemni/eval.h
${LEMNI_INCLUDE_DIR}/lemni/compile.h
)
include_directories(include)
set(UTF8_TESTS OFF CACHE BOOL "" FORCE)
set(UTF8_INSTALL OFF CACHE BOOL "" FORCE)
set(UTF8_SAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(deps/utfcpp)
add_subdirectory(deps/replxx)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
add_subdirectory(deps/fmt)
#ExternalProject_Add(
# libjit-git
# GIT_REPOSITORY "https://git.savannah.gnu.org/git/libjit.git"
# PREFIX ${CMAKE_BINARY_DIR}/libjit
# CONFIGURE_COMMAND autoreconf -i -f -v ${CMAKE_BINARY_DIR}/libjit/src/libjit && ${CMAKE_BINARY_DIR}/libjit/src/libjit/configure --prefix=<INSTALL_DIR>
# BUILD_COMMAND ${MAKE}
#)
include_directories(${CMAKE_BINARY_DIR}/libjit/include)
link_directories(${CMAKE_BINARY_DIR}/libjit/lib)
add_subdirectory(lib)
add_subdirectory(repl)