CMakeLists.txt
changeset 7397 833fc211ca2d
parent 7264 4c438ad3eddc
child 7704 b25add2fdfa6
equal deleted inserted replaced
7396:7c0e07c23aad 7397:833fc211ca2d
   157 set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
   157 set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
   158 set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
   158 set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
   159 set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
   159 set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
   160 set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
   160 set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
   161 
   161 
   162 separate_arguments(fpflags_full UNIX_COMMAND ${FPFLAGS})
   162 #parse additional parameters
       
   163 if(FPFLAGS OR GHFLAGS)
       
   164     math(EXPR cmake_version "${CMAKE_MAJOR_VERSION}*10000 + ${CMAKE_MINOR_VERSION}*100 + ${CMAKE_PATCH_VERSION}")
       
   165     if(cmake_version LESS "020800")
       
   166         message(STATUS "FPFLAGS and GHFLAGS are available only from Cmake 2.8, ignoring...")
       
   167     else()
       
   168         separate_arguments(fpflags_full UNIX_COMMAND ${FPFLAGS})
       
   169         separate_arguments(ghflags_full UNIX_COMMAND ${GHFLAGS})
       
   170     endif()
       
   171 endif()
       
   172 
   163 set(pascal_flags ${fpflags_full} "-B" "-FE../bin" "-Cs2000000" "-vewn" "-dDEBUGFILE" ${pascal_flags})
   173 set(pascal_flags ${fpflags_full} "-B" "-FE../bin" "-Cs2000000" "-vewn" "-dDEBUGFILE" ${pascal_flags})
   164 separate_arguments(ghflags_full UNIX_COMMAND ${GHFLAGS})
   174 set(haskell_flags "-O2" ${ghflags_full} ${haskell_flags})
   165 set(haskell_flags "-O2" ${haskell_flags} ${ghflags_full})
       
   166 
   175 
   167 if(Optz)
   176 if(Optz)
   168 #    set(pascal_flags "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_flags})
   177 #    set(pascal_flags "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_flags})
   169     set(pascal_flags "-Os" "-Ooregvar" "-Xs" "-Si" ${pascal_flags})
   178     set(pascal_flags "-Os" "-Ooregvar" "-Xs" "-Si" ${pascal_flags})
   170     set(haskell_flags "-w" "-fno-warn-unused-do-bind" ${haskell_flags})
   179     set(haskell_flags "-w" "-fno-warn-unused-do-bind" ${haskell_flags})