Set some specific build options for gcc and clang.

metadata
Edgar Velazquez-Armendariz 2014-01-25 23:31:53 -05:00
parent 7c0cb383c3
commit 330844dc60
1 changed files with 7 additions and 1 deletions

View File

@ -10,7 +10,13 @@ endif()
if (MTS_CMAKE_INIT) if (MTS_CMAKE_INIT)
set(MTS_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(MTS_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(MTS_CXX_FLAGS "-fvisibility=hidden -pipe -march=nocona -mfpmath=sse -ffast-math -Wall -Winvalid-pch") set(MTS_CXX_FLAGS "-fvisibility=hidden -pipe -march=nocona -ffast-math -Wall -Winvalid-pch")
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(MTS_CXX_FLAGS "${MTS_CXX_FLAGS} -mfpmath=sse")
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(MTS_CXX_FLAGS "${MTS_CXX_FLAGS} -ftemplate-depth=512")
endif() endif()
if (MTS_CXX_FLAGS) if (MTS_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${MTS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" CACHE set(CMAKE_CXX_FLAGS "${MTS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" CACHE