Add flags to build.

This commit is contained in:
Nicolás Ortega Froysa 2018-10-25 19:56:30 +02:00
parent 709345afb7
commit 552ca5e6a9
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF

View File

@ -25,6 +25,7 @@ project(TrippyCube CXX)
# Binary filename
set(TARGET_NAME "trippy-cube")
set(TARGET_VERSION "v2.0")
# Use DEBUG by default
if(NOT CMAKE_BUILD_TYPE)
@ -60,11 +61,13 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os")
if(CMAKE_BUILD_TYPE STREQUAL "debug" OR CMAKE_BUILD_TYPE STREQUAL "relwithdebinfo")
add_definitions(-DDEBUG)
add_definitions("-DDEBUG")
else()
add_definitions(-DNDEBUG)
add_definitions("-DNDEBUG")
endif()
add_definitions("-DVERSION=\"${TARGET_VERSION}\"")
add_executable(${TARGET_NAME}
${SRCS})