gameServer/CMakeLists.txt
changeset 2406 2e757b32991e
parent 2401 2a694ea2a437
child 2409 dbf195c3e09c
equal deleted inserted replaced
2405:3b8607ac32c6 2406:2e757b32991e
    31 	-i${hedgewars_SOURCE_DIR}/gameServer
    31 	-i${hedgewars_SOURCE_DIR}/gameServer
    32 	-o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}
    32 	-o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}
    33 	-odir ${CMAKE_CURRENT_BINARY_DIR}
    33 	-odir ${CMAKE_CURRENT_BINARY_DIR}
    34 	-hidir ${CMAKE_CURRENT_BINARY_DIR})
    34 	-hidir ${CMAKE_CURRENT_BINARY_DIR})
    35 
    35 
    36 if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES "Release")
    36 if(OPTIMIZATIONS)
    37 set(ghc_flags
    37 set(ghc_flags
    38 	-w
    38 	-w
    39 	-O2
    39 	-O2
    40 	${ghc_flags}
    40 	${ghc_flags}
    41 )
    41 )
    42 else()
    42 else(OPTIMIZATIONS)
    43 set(ghc_flags
    43 set(ghc_flags
    44 	-Wall
    44 	-Wall
    45 	-debug
    45 	-debug
    46 	-dcore-lint
    46 	-dcore-lint
    47 	${ghc_flags}
    47 	${ghc_flags}
    48 )
    48 )
    49 endif()
    49 endif(OPTIMIZATIONS)
    50 
    50 
    51 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
    51 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
    52 		COMMAND "${ghc_executable}"
    52 		COMMAND "${ghc_executable}"
    53 		ARGS ${ghc_flags}
    53 		ARGS ${ghc_flags}
    54 		MAIN_DEPENDENCY ${hwserv_main}
    54 		MAIN_DEPENDENCY ${hwserv_main}