2010-09-29 23:42:09 +02:00
|
|
|
# Set build-directive (used in core to tell which buildtype we used)
|
2010-09-30 13:04:46 +02: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)
|
|
|
|
|
|
|
|
|
|
if( USE_SFMT)
|
2010-09-20 20:58:57 +02:00
|
|
|
if(PLATFORM EQUAL 32)
|
|
|
|
|
# Required on 32-bit systems to enable SSE2 (standard on x64)
|
|
|
|
|
add_definitions(-msse2 -mfpmath=sse)
|
|
|
|
|
endif()
|
|
|
|
|
add_definitions(-DHAVE_SSE2 -D__SSE2__)
|
2010-09-29 23:42:09 +02:00
|
|
|
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
|
2010-08-28 18:49:17 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
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()
|