forked from bartvdbraak/blender
28 lines
941 B
CMake
28 lines
941 B
CMake
|
|
# Platform specific build flags
|
|
|
|
SET(GCC_WARNING_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-long-long")
|
|
SET(GCC_OPTIM_FLAGS "-ffast-math -fPIC -msse -msse2 -msse3 -mtune=native")
|
|
|
|
IF(APPLE)
|
|
SET(CMAKE_CXX_FLAGS "${GCC_WARNING_FLAGS} ${GCC_OPTIM_FLAGS}")
|
|
SET(RTTI_DISABLE_FLAGS "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
|
|
SET(PYTHON_MODULE_FLAGS "-undefined dynamic_lookup")
|
|
ENDIF(APPLE)
|
|
|
|
IF(WIN32)
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ox /Ot /arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /EHsc /fp:fast")
|
|
SET(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
|
|
SET(PYTHON_MODULE_FLAGS "-DLL")
|
|
ENDIF(WIN32)
|
|
|
|
IF(UNIX AND NOT APPLE)
|
|
SET(CMAKE_CXX_FLAGS "${GCC_WARNING_FLAGS} ${GCC_OPTIM_FLAGS}")
|
|
SET(RTTI_DISABLE_FLAGS "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
|
|
SET(PYTHON_MODULE_FLAGS "-fPIC")
|
|
ENDIF(UNIX AND NOT APPLE)
|
|
|
|
ADD_DEFINITIONS(-DCCL_NAMESPACE_BEGIN=namespace\ ccl\ {)
|
|
ADD_DEFINITIONS(-DCCL_NAMESPACE_END=})
|
|
|