7973
|
1 |
set(pas2c_sources
|
7985
|
2 |
Main.hs
|
|
3 |
PascalBasics.hs
|
|
4 |
PascalParser.hs
|
|
5 |
PascalPreprocessor.hs
|
|
6 |
PascalUnitSyntaxTree.hs
|
8044
|
7 |
Pas2C.hs
|
7985
|
8 |
)
|
7973
|
9 |
|
8044
|
10 |
set(pas2c_main ${CMAKE_SOURCE_DIR}/tools/pas2c/Main.hs)
|
7973
|
11 |
|
|
12 |
set(ghc_flags
|
7985
|
13 |
--make ${pas2c_main}
|
8044
|
14 |
-i${CMAKE_SOURCE_DIR}/tools/pas2c/
|
7985
|
15 |
-o ${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}
|
|
16 |
-odir ${CMAKE_CURRENT_BINARY_DIR}
|
|
17 |
-hidir ${CMAKE_CURRENT_BINARY_DIR}
|
|
18 |
${haskell_flags}
|
|
19 |
)
|
7973
|
20 |
|
|
21 |
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}"
|
|
22 |
COMMAND "${ghc_executable}"
|
|
23 |
ARGS ${ghc_flags}
|
|
24 |
MAIN_DEPENDENCY ${hwserv_main}
|
|
25 |
DEPENDS ${hwserver_sources}
|
|
26 |
)
|
|
27 |
|
|
28 |
add_custom_target(pas2c ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}")
|
|
29 |
|