Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/CMakeLists.txt
| Show First 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | |||||
| set(SRC_KERNEL_UTIL_HEADERS | set(SRC_KERNEL_UTIL_HEADERS | ||||
| util/color.h | util/color.h | ||||
| util/differential.h | util/differential.h | ||||
| util/lookup_table.h | util/lookup_table.h | ||||
| util/profiling.h | util/profiling.h | ||||
| ) | ) | ||||
| set(SRC_KERNEL_TYPES_HEADERS | set(SRC_KERNEL_TYPES_HEADERS | ||||
| tables.h | |||||
| textures.h | textures.h | ||||
| types.h | types.h | ||||
| ) | ) | ||||
| set(SRC_KERNEL_HEADERS | set(SRC_KERNEL_HEADERS | ||||
| ${SRC_KERNEL_BAKE_HEADERS} | ${SRC_KERNEL_BAKE_HEADERS} | ||||
| ${SRC_KERNEL_BVH_HEADERS} | ${SRC_KERNEL_BVH_HEADERS} | ||||
| ${SRC_KERNEL_CAMERA_HEADERS} | ${SRC_KERNEL_CAMERA_HEADERS} | ||||
| ▲ Show 20 Lines • Show All 282 Lines • ▼ Show 20 Lines | set(hip_flags | ||||
| -I ${CMAKE_CURRENT_SOURCE_DIR}/.. | -I ${CMAKE_CURRENT_SOURCE_DIR}/.. | ||||
| -I ${CMAKE_CURRENT_SOURCE_DIR}/device/hip | -I ${CMAKE_CURRENT_SOURCE_DIR}/device/hip | ||||
| -Wno-parentheses-equality | -Wno-parentheses-equality | ||||
| -Wno-unused-value | -Wno-unused-value | ||||
| --hipcc-func-supp | --hipcc-func-supp | ||||
| -ffast-math | -ffast-math | ||||
| -o ${CMAKE_CURRENT_BINARY_DIR}/${hip_file}) | -o ${CMAKE_CURRENT_BINARY_DIR}/${hip_file}) | ||||
| if(WITH_NANOVDB) | |||||
| set(hip_flags ${hip_flags} | |||||
| -D WITH_NANOVDB | |||||
| -I "${NANOVDB_INCLUDE_DIR}") | |||||
| endif() | |||||
| if(WITH_CYCLES_DEBUG) | if(WITH_CYCLES_DEBUG) | ||||
| set(hip_flags ${hip_flags} -D WITH_CYCLES_DEBUG) | set(hip_flags ${hip_flags} -D WITH_CYCLES_DEBUG) | ||||
| endif() | endif() | ||||
| add_custom_command( | add_custom_command( | ||||
| OUTPUT ${hip_file} | OUTPUT ${hip_file} | ||||
| COMMAND ${hip_command} ${hip_flags} | COMMAND ${hip_command} ${hip_flags} | ||||
| DEPENDS ${kernel_sources}) | DEPENDS ${kernel_sources}) | ||||
| ▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
| include_directories(SYSTEM ${INC_SYS}) | include_directories(SYSTEM ${INC_SYS}) | ||||
| if(WITH_COMPILER_ASAN) | if(WITH_COMPILER_ASAN) | ||||
| if(CMAKE_COMPILER_IS_GNUCC AND (NOT WITH_CYCLES_KERNEL_ASAN)) | if(CMAKE_COMPILER_IS_GNUCC AND (NOT WITH_CYCLES_KERNEL_ASAN)) | ||||
| # GCC hangs compiling the big kernel files with asan and release, so disable by default. | # GCC hangs compiling the big kernel files with asan and release, so disable by default. | ||||
| string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -fno-sanitize=all") | string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -fno-sanitize=all") | ||||
| string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fno-sanitize=vptr") | string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fno-sanitize=vptr") | ||||
| elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") | elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") | ||||
| # With OSL, Cycles disables rtti in some modules, wich then breaks at linking | # With OSL, Cycles disables rtti in some modules, which then breaks at linking | ||||
| # when trying to use vptr sanitizer (included into 'undefined' general option). | # when trying to use vptr sanitizer (included into 'undefined' general option). | ||||
| string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -fno-sanitize=vptr") | string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -fno-sanitize=vptr") | ||||
| string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fno-sanitize=vptr") | string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fno-sanitize=vptr") | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| set_source_files_properties(device/cpu/kernel.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}") | set_source_files_properties(device/cpu/kernel.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}") | ||||
| ▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines | |||||