Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/bvh/CMakeLists.txt
| Show All 25 Lines | set(SRC | ||||
| build.cpp | build.cpp | ||||
| embree.cpp | embree.cpp | ||||
| multi.cpp | multi.cpp | ||||
| node.cpp | node.cpp | ||||
| optix.cpp | optix.cpp | ||||
| sort.cpp | sort.cpp | ||||
| split.cpp | split.cpp | ||||
| unaligned.cpp | unaligned.cpp | ||||
| metal.mm | |||||
| ) | ) | ||||
| set(SRC_HEADERS | set(SRC_HEADERS | ||||
| bvh.h | bvh.h | ||||
| bvh2.h | bvh2.h | ||||
| binning.h | binning.h | ||||
| build.h | build.h | ||||
| embree.h | embree.h | ||||
| multi.h | multi.h | ||||
| node.h | node.h | ||||
| optix.h | optix.h | ||||
| params.h | params.h | ||||
| sort.h | sort.h | ||||
| split.h | split.h | ||||
| unaligned.h | unaligned.h | ||||
| metal.h | |||||
| ) | ) | ||||
| set(LIB | set(LIB | ||||
| cycles_scene | cycles_scene | ||||
| cycles_util | cycles_util | ||||
| ) | ) | ||||
| include_directories(${INC}) | include_directories(${INC}) | ||||
| include_directories(SYSTEM ${INC_SYS}) | include_directories(SYSTEM ${INC_SYS}) | ||||
| if(WITH_CYCLES_EMBREE) | if(WITH_CYCLES_EMBREE) | ||||
| list(APPEND LIB | list(APPEND LIB | ||||
brecht: It was not immediately obvious to me why this was used rather than using the `.mm` file… | |||||
Done Inline ActionsI have changed from .cpp to .mm files and moved some internal stuff out of metal/device.h. I still need to try that bvh_metal_create suggestion which will probably involve a slight change to the encapsulation approach. michael_jones: I have changed from .cpp to .mm files and moved some internal stuff out of metal/device.h. I… | |||||
| ${EMBREE_LIBRARIES} | ${EMBREE_LIBRARIES} | ||||
| ) | ) | ||||
| endif() | endif() | ||||
| cycles_add_library(cycles_bvh "${LIB}" ${SRC} ${SRC_HEADERS}) | cycles_add_library(cycles_bvh "${LIB}" ${SRC} ${SRC_HEADERS}) | ||||
It was not immediately obvious to me why this was used rather than using the .mm file extension. But I guess it is because the header file contains objective c++ code and is included in .cpp files shared with other platforms.
I think I would prefer to use .mm extensions anyway and then move the class declaration into the source file, with a BVH *bvh_metal_create(..); in the header. And similar for the device code.
Mainly for consistency with the rest of Blender, and to avoid potential issues with syntax highlighting or code formatting.