diff --git a/data/cmake/MitsubaBuildOptions.cmake b/data/cmake/MitsubaBuildOptions.cmake index 7aae4210..a53e56f1 100644 --- a/data/cmake/MitsubaBuildOptions.cmake +++ b/data/cmake/MitsubaBuildOptions.cmake @@ -10,7 +10,13 @@ endif() if (MTS_CMAKE_INIT) set(MTS_CXX_FLAGS "${CMAKE_CXX_FLAGS}") 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() if (MTS_CXX_FLAGS) set(CMAKE_CXX_FLAGS "${MTS_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" CACHE