~cypheon/rapid

ref: 9928b2ee6ed80e49271a11f7254409cdad7a574f rapid/CMakeLists.txt -rw-r--r-- 1.8 KiB
9928b2ee — Johann Rudloff [refactor] Codegen: use simpler state modification methods 6 months ago
                                                                                
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
cmake_minimum_required(VERSION 3.18)

project(rapid)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

find_package(Idris2)

set(RAPID_SUPPORT_BINARIES "${CMAKE_BINARY_DIR}/build/support")
add_custom_target(test)

add_idris_package(rapid-lite rapid-lite.ipkg
  src/Compiler/GenLLVMIR.idr
  src/Compiler/LLVM/Instruction.idr
  src/Compiler/LLVM/IR.idr
  src/Compiler/LLVM/Rapid/Builtin.idr
  src/Compiler/LLVM/Rapid/Closure.idr
  src/Compiler/LLVM/Rapid/Foreign.idr
  src/Compiler/LLVM/Rapid/Integer.idr
  src/Compiler/LLVM/Rapid/Object.idr
  src/Compiler/LLVM/Rapid/String.idr
  src/Compiler/Optimize.idr
  src/Compiler/PrepareCode.idr
  src/Compiler/VMCodeSexp.idr
  src/Control/Codegen.idr
  src/Data/Sexp.idr
  src/Data/Sexp/Lexer.idr
  src/Data/Sexp/Parser.idr
  src/Data/Utils.idr
  src/Rapid/Common.idr
  src/Rapid/Driver.idr
  src/Rapid/Lite.idr
  )

add_idris_package(rapidc rapidc.ipkg
  src/Compiler/Codegen/LLVM.idr
  src/Compiler/Codegen/VmcodeSexp.idr
  src/Compiler/GenLLVMIR.idr
  src/Compiler/LLVM/Instruction.idr
  src/Compiler/LLVM/IR.idr
  src/Compiler/LLVM/Rapid/Builtin.idr
  src/Compiler/LLVM/Rapid/Closure.idr
  src/Compiler/LLVM/Rapid/Foreign.idr
  src/Compiler/LLVM/Rapid/Integer.idr
  src/Compiler/LLVM/Rapid/Object.idr
  src/Compiler/LLVM/Rapid/String.idr
  src/Compiler/PrepareCode.idr
  src/Compiler/VMCodeSexp.idr
  src/Control/Codegen.idr
  src/Data/Sexp.idr
  src/Data/Utils.idr
  src/Rapid/Common.idr
  src/Rapid/Driver.idr
  src/Rapid/Main.idr
)

add_subdirectory(llvm)
add_subdirectory(rts)

add_custom_target(rapidc_test
  COMMAND cmake -E env "IDRIS2_DATA=${RAPID_SUPPORT_BINARIES}:${CMAKE_CURRENT_SOURCE_DIR}/support:$ENV{IDRIS2_DATA}" rapidc=${rapidc_EXECUTABLE} ./runtests.sh --good
  DEPENDS rapidc rapid_rts
  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
  USES_TERMINAL
  )
add_dependencies(test rapidc_test)