equal
deleted
inserted
replaced
212 separate_arguments(fpflags_parsed UNIX_COMMAND ${FPFLAGS}) |
212 separate_arguments(fpflags_parsed UNIX_COMMAND ${FPFLAGS}) |
213 separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS}) |
213 separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS}) |
214 endif() |
214 endif() |
215 endif() |
215 endif() |
216 |
216 |
217 list(APPEND pascal_flags ${fpflags_parsed} # user flags |
217 list(APPEND pascal_flags ${fpflags_parsed} # user flags |
218 "-vm4079,4080,4081" # fpc output format |
218 "-vm4079,4080,4081" # fpc output format |
219 "-B" # compile all units |
219 "-B" # compile all units |
220 "-FE${PROJECT_BINARY_DIR}/bin" # fpc output directory |
220 "-FE${PROJECT_BINARY_DIR}/bin" # fpc output directory |
221 "-Fl${PROJECT_BINARY_DIR}/bin" # fpc linking directory |
221 "-Fl${PROJECT_BINARY_DIR}/bin" # fpc linking directory |
222 "-Cs2000000" # stack size |
222 "-Cs2000000" # stack size |
226 list(APPEND haskell_flags "-O2" ${ghflags_parsed}) |
226 list(APPEND haskell_flags "-O2" ${ghflags_parsed}) |
227 |
227 |
228 #get BUILD_TYPE and enable/disable optimisation |
228 #get BUILD_TYPE and enable/disable optimisation |
229 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration") |
229 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration") |
230 if(CMAKE_BUILD_TYPE MATCHES "DEBUG") |
230 if(CMAKE_BUILD_TYPE MATCHES "DEBUG") |
231 list(APPEND pascal_flags "-O-" "-g" "-gl" "-gv") |
231 list(APPEND pascal_flags "-O-" # disable all optimisations |
|
232 "-g" # enable debug symbols |
|
233 "-gl" # add line info to bt |
|
234 "-gv" # allow valgrind |
|
235 ) |
232 list(APPEND haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind") |
236 list(APPEND haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind") |
233 else() |
237 else() |
234 # set(pascal_flags "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_flags}) |
238 list(APPEND pascal_flags "-Os" # optimise for size |
235 list(APPEND pascal_flags "-Os" "-Xs" "-Si") |
239 "-Xs" # strip binary |
|
240 "-Si" # turn on inlining |
|
241 ) |
236 list(APPEND haskell_flags "-w" "-fno-warn-unused-do-bind") |
242 list(APPEND haskell_flags "-w" "-fno-warn-unused-do-bind") |
237 endif() |
243 endif() |
238 |
244 |
239 |
245 |
240 #server discovery |
246 #server discovery |