CMakeLists.txt
changeset 11402 bea08a303cb7
parent 11383 d3b603323b2b
child 11403 b894922d58cc
child 11654 870f22de388b
equal deleted inserted replaced
11401:7012234df6c4 11402:bea08a303cb7
   116     else()
   116     else()
   117         message("*** GHFLAGS are available only when using CMake >= 2.8 ***")
   117         message("*** GHFLAGS are available only when using CMake >= 2.8 ***")
   118     endif()
   118     endif()
   119 endif()
   119 endif()
   120 
   120 
   121 list(APPEND haskell_flags ${ghflags_parsed} "-O2")
       
   122 
   121 
   123 #get BUILD_TYPE and enable/disable optimisation
   122 #get BUILD_TYPE and enable/disable optimisation
   124 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
   123 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
   125 if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
   124 if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
   126     list(APPEND haskell_flags "-Wall"       # all warnings
   125     list(APPEND haskell_flags "-Wall"       # all warnings
   127                               "-debug"      # debug mode
   126                               "-debug"      # debug mode
   128                               "-dcore-lint" # internal sanity check
       
   129                               "-fno-warn-unused-do-bind"
   127                               "-fno-warn-unused-do-bind"
       
   128                               "-O0"
   130                               )
   129                               )
   131 else()
   130 else()
   132     list(APPEND haskell_flags "-w" # no warnings
   131     list(APPEND haskell_flags "-w" # no warnings
       
   132                               "-O2"
   133                               )
   133                               )
   134 endif()
   134 endif()
   135 
   135 
   136 
   136 
   137 #build engine without freepascal
   137 #build engine without freepascal