diff options
Diffstat (limited to 'intern/cycles/CMakeLists.txt')
-rw-r--r-- | intern/cycles/CMakeLists.txt | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 1014831c403..6d4d2e38e82 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -177,14 +177,11 @@ if(CXX_HAS_AVX2) add_definitions(-DWITH_KERNEL_AVX2) endif() -if(WITH_CYCLES_OSL) - # LLVM and OSL need to build without RTTI - if(WIN32 AND MSVC) - set(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID") - elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang")) - set(RTTI_DISABLE_FLAGS "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}") +# LLVM and OSL need to build without RTTI +if(WIN32 AND MSVC) + set(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID") +elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang")) + set(RTTI_DISABLE_FLAGS "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID") endif() # Definitions and Includes |