-
Notifications
You must be signed in to change notification settings - Fork 42
/
config.cmake
77 lines (65 loc) · 2.7 KB
/
config.cmake
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
77
# 你的学号
set(STUDENT_ID "0123456789")
# 你的姓名
set(STUDENT_NAME "某某某")
# 实验一的完成方式:"flex"或"antlr"
set(TASK1_WITH "flex")
# 实验一的日志级别,级别从低到高为0-3
set(TASK1_LOG_LEVEL 3)
# 实验二的完成方式:"bison"或"antlr"
set(TASK2_WITH "bison")
# 是否在实验二复活,ON或OFF
set(TASK2_REVIVE ON)
# 实验二的日志级别,级别从低到高为0-3
set(TASK2_LOG_LEVEL 3)
# 是否在实验三复活,ON或OFF
set(TASK3_REVIVE ON)
# 是否在实验四复活,ON或OFF
set(TASK4_REVIVE ON)
# ############################################################################ #
# 以下内容为内部环境配置,一般情况下不需要学生修改,学生本地的修改对实验评测无影响。
# ############################################################################ #
# ANTLR4
if(DEFINED ENV{ANTLR_DIR})
message("ANTLR目录为 $ENV{ANTLR_DIR}")
set(antlr4-runtime_DIR "$ENV{ANTLR_DIR}/install/lib/cmake/antlr4-runtime")
set(antlr4-generator_DIR "$ENV{ANTLR_DIR}/install/lib/cmake/antlr4-generator")
set(ANTLR4_JAR_LOCATION "$ENV{ANTLR_DIR}/antlr-4.13.1-complete.jar")
else()
message("ANTLR目录为 ${CMAKE_SOURCE_DIR}/antlr")
set(antlr4-runtime_DIR
"${CMAKE_SOURCE_DIR}/antlr/install/lib/cmake/antlr4-runtime")
set(antlr4-generator_DIR
"${CMAKE_SOURCE_DIR}/antlr/install/lib/cmake/antlr4-generator")
set(ANTLR4_JAR_LOCATION "${CMAKE_SOURCE_DIR}/antlr/antlr-4.13.1-complete.jar")
endif()
# llvm clang
if(DEFINED ENV{LLVM_DIR})
message("LLVM目录为 $ENV{LLVM_DIR}")
set(LLVM_DIR "$ENV{LLVM_DIR}/install/lib/cmake/llvm")
set(CLANG_EXECUTABLE "$ENV{LLVM_DIR}/install/bin/clang")
set(CLANG_PLUS_EXECUTABLE "$ENV{LLVM_DIR}/install/bin/clang++")
else()
message("LLVM目录为 ${CMAKE_SOURCE_DIR}/llvm")
set(LLVM_DIR "${CMAKE_SOURCE_DIR}/llvm/install/lib/cmake/llvm")
set(CLANG_EXECUTABLE "${CMAKE_SOURCE_DIR}/llvm/install/bin/clang")
set(CLANG_PLUS_EXECUTABLE "${CMAKE_SOURCE_DIR}/llvm/install/bin/clang++")
endif()
# 测试运行时限(秒)
set(CTEST_TEST_TIMEOUT 3)
# 实验一排除测例名的正则式
set(TASK1_EXCLUDE_REGEX "^performance/.*")
# 实验一测例表,非空时忽略 EXCLUDE_REGEX
set(TASK1_CASES_TXT "")
# 实验二排除测例名的正则式
set(TASK2_EXCLUDE_REGEX "^performance/.*")
# 实验二测例表,非空时忽略 EXCLUDE_REGEX
set(TASK2_CASES_TXT "")
# 实验三排除测例名的正则式
set(TASK3_EXCLUDE_REGEX "^performance/.*")
# 实验三测例表,非空时忽略 EXCLUDE_REGEX
set(TASK3_CASES_TXT "")
# 实验四排除测例名的正则式
set(TASK4_EXCLUDE_REGEX "^functional-.*|^mini-performance/.*")
# 实验四测例表,非空时忽略 EXCLUDE_REGEX
set(TASK4_CASES_TXT "")