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