2010-09-29 23:42:09 +02:00
|
|
|
# Set build-directive (used in core to tell which buildtype we used)
|
2010-12-20 02:23:55 +01:00
|
|
|
add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')
|
2010-09-29 23:42:09 +02:00
|
|
|
|
2010-08-28 18:49:17 +02:00
|
|
|
add_definitions(-fno-delete-null-pointer-checks)
|
|
|
|
|
|
2012-03-27 02:27:12 +02:00
|
|
|
if(PLATFORM EQUAL 32)
|
|
|
|
|
# Required on 32-bit systems to enable SSE2 (standard on x64)
|
|
|
|
|
add_definitions(-msse2 -mfpmath=sse)
|
2010-08-28 18:49:17 +02:00
|
|
|
endif()
|
2012-03-27 02:27:12 +02:00
|
|
|
add_definitions(-DHAVE_SSE2 -D__SSE2__)
|
|
|
|
|
message(STATUS "GCC: SSE2 flags forced")
|
2010-08-28 18:49:17 +02:00
|
|
|
|
|
|
|
|
if( WITH_WARNINGS )
|
|
|
|
|
add_definitions(-Wall -Wfatal-errors -Wextra)
|
2010-09-29 23:42:09 +02:00
|
|
|
message(STATUS "GCC: All warnings enabled")
|
2010-08-28 18:49:17 +02:00
|
|
|
else()
|
|
|
|
|
add_definitions(--no-warnings)
|
2010-09-29 23:42:09 +02:00
|
|
|
message(STATUS "GCC: All warnings disabled")
|
2010-08-28 18:49:17 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if( WITH_COREDEBUG )
|
|
|
|
|
add_definitions(-ggdb3)
|
2010-09-29 23:42:09 +02:00
|
|
|
message(STATUS "GCC: Debug-flags set (-ggdb3)")
|
2010-08-28 18:49:17 +02:00
|
|
|
endif()
|