File tree 2 files changed +11
-11
lines changed
2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -7,38 +7,38 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
7
7
include (BootstrapIsa)
8
8
9
9
bootstrap_isa(${CMAKE_CURRENT_SOURCE_DIR} /asm.isa)
10
- set (ASM_INCLUDE_DIRS ${asm_GENERATED_DIR} )
10
+ set (ASM_GENERATED_INCLUDE_DIR ${asm_GENERATED_DIR} )
11
11
12
12
include_directories (
13
13
module-context
14
14
${ANTLR4_INCLUDE_DIRS}
15
15
func-creator
16
16
source -descriptor
17
17
${SIM_PATH}
18
- ${ASM_INCLUDE_DIRS }
18
+ ${ASM_GENERATED_INCLUDE_DIR }
19
19
)
20
20
21
21
# once instruction grammars are generated, initialize antlr generator chain
22
22
antlr_target(
23
- IsaLexer
23
+ IsaInstructionsLexer
24
24
${asm_INSTRUCTION_LEXER}
25
25
LEXER
26
26
OUTPUT_DIRECTORY ${asm_GENERATED_DIR}
27
- DEPENDS generateInstructionGrammar ${asm_GRAMMAR_SOURCES}
27
+ DEPENDS generateInstructionsGrammar ${asm_GRAMMAR_SOURCES}
28
28
)
29
29
30
30
antlr_target(
31
31
AsmLexer
32
32
${CMAKE_CURRENT_SOURCE_DIR} /asmLexer.g4
33
33
LEXER
34
- DEPENDS_ANTLR IsaLexer
34
+ DEPENDS_ANTLR IsaInstructionsLexer
35
35
OUTPUT_DIRECTORY ${asm_GENERATED_DIR}
36
36
COMPILE_FLAGS -lib ${asm_GENERATED_DIR}
37
37
)
38
38
39
39
40
40
antlr_target(
41
- IsaParser
41
+ IsaInstructionsParser
42
42
${asm_INSTRUCTION_PARSER}
43
43
PARSER
44
44
DEPENDS_ANTLR AsmLexer
@@ -52,7 +52,7 @@ antlr_target(
52
52
PARSER
53
53
LISTENER
54
54
VISITOR
55
- DEPENDS_ANTLR IsaParser
55
+ DEPENDS_ANTLR IsaInstructionsParser
56
56
COMPILE_FLAGS -lib ${asm_GENERATED_DIR}
57
57
OUTPUT_DIRECTORY ${asm_GENERATED_DIR}
58
58
)
Original file line number Diff line number Diff line change @@ -19,17 +19,17 @@ macro(bootstrap_isa isaPathStr)
19
19
endforeach ()
20
20
21
21
22
- set (${isaName} _INSTRUCTION_LEXER "${CMAKE_CURRENT_BINARY_DIR} /${outputDir} /${isaName} InstructionLexer.g4" )
23
- set (${isaName} _INSTRUCTION_PARSER "${CMAKE_CURRENT_BINARY_DIR} /${outputDir} /${isaName} InstructionParser.g4" )
24
- set (${isaName} _GRAMMAR_SOURCES ${${isaName} _INSTRUCTION_PARSER } ${${isaName} _INSTRUCTION_LEXER })
22
+ set (${isaName} _INSTRUCTIONS_LEXER "${CMAKE_CURRENT_BINARY_DIR} /${outputDir} /${isaName} InstructionLexer.g4" )
23
+ set (${isaName} _INSTRUCTIONS_PARSER "${CMAKE_CURRENT_BINARY_DIR} /${outputDir} /${isaName} InstructionParser.g4" )
24
+ set (${isaName} _INSTRUCTIONS_GRAMMAR_SOURCES ${${isaName} _INSTRUCTIONS_PARSER } ${${isaName} _INSTRUCTIONS_LEXER })
25
25
26
26
27
27
add_custom_command (
28
28
OUTPUT ${${isaName} _GENERATED_SOURCES} ${${isaName} _GRAMMAR_SOURCES}
29
29
COMMAND mkdir -p ${outputDir} && cd ${outputDir} && ${CMAKE_BINARY_DIR} /asm/isa-creator/bootstrapIsa ${isaPath}
30
30
DEPENDS ${CMAKE_BINARY_DIR} /asm/isa-creator/bootstrapIsa ${isaPath} )
31
31
32
- add_custom_target (generateInstructionGrammar DEPENDS ${${isaName} _GRAMMAR_SOURCES })
32
+ add_custom_target (generateInstructionGrammar DEPENDS ${${isaName} _INSTRUCTIONS_GRAMMAR_SOURCES })
33
33
34
34
set (${isaName} _GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR} /${outputDir} )
35
35
set (${isaName} _ISA_SOURCES ${${isaName} _GENERATED_SOURCES})
You can’t perform that action at this time.
0 commit comments