From fb023194e39a86406e259ca95899b9df2c35851c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Sun, 25 Mar 2018 16:40:56 +0200 Subject: [PATCH] Add fast-math optimization for release builds. --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6c7444..25dd0eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,8 @@ message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") set(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra -Werror") set(CMAKE_C_FLAGS_DEBUG "-g -O0") -set(CMAKE_C_FLAGS_RELEASE "-O3") -set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3") +set(CMAKE_C_FLAGS_RELEASE "-O3 -ffast-math") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -ffast-math") set(CMAKE_C_FLAGS_MINSIZEREL "-Os") find_package(PkgConfig REQUIRED) @@ -44,7 +44,8 @@ include_directories( set(SRCS src/display.c src/event_manager.c - src/main.c) + src/main.c + src/ship.c) add_definitions(-DVERSION="${TARGET_VERSION}") @@ -58,6 +59,7 @@ endif() add_executable(${TARGET_NAME} ${SRCS}) target_link_libraries(${TARGET_NAME} + m # math library ${ALLEG5_LIBRARIES} ${ALLEG5-PRIM_LIBRARIES} ${ALLEG5-FONT_LIBRARIES})