Cycles: Fix test compilation failure after recent refactor
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 24 Oct 2017 08:47:02 +0000 (10:47 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 24 Oct 2017 08:48:16 +0000 (10:48 +0200)
The test will leak CPU devices, but is all passing other than that.
Leak will be fixed shortly.

P.S. Committing code refactor without running regression tests, tsk ;)

intern/cycles/test/CMakeLists.txt
intern/cycles/test/render_graph_finalize_test.cpp

index 80564c33be6b4e6ab26d5182ba0847a294158d3e..f4213c508fc3ef50556d5f14c1ea669b85be7d60 100644 (file)
@@ -22,12 +22,17 @@ set(INC
 )
 
 set(ALL_CYCLES_LIBRARIES
-       cycles_render
        cycles_device
+       cycles_kernel
+       cycles_render
        cycles_bvh
        cycles_graph
        cycles_subd
        cycles_util
+       extern_clew
+       ${BLENDER_GL_LIBRARIES}
+       ${BLENDER_GLEW_LIBRARIES}
+       ${CYCLES_APP_GLEW_LIBRARY}
        ${OPENIMAGEIO_LIBRARIES}
 )
 if(WITH_CYCLES_OSL)
@@ -52,6 +57,15 @@ if(WITH_CYCLES_OPENSUBDIV)
                ${OPENSUBDIV_LIBRARIES}
        )
 endif()
+if(WITH_CUDA_DYNLOAD)
+       list(APPEND ALL_CYCLES_LIBRARIES extern_cuew)
+else()
+       list(APPEND ALL_CYCLES_LIBRARIES ${CUDA_CUDA_LIBRARY})
+endif()
+if(NOT CYCLES_STANDALONE_REPOSITORY)
+       list(APPEND ALL_CYCLES_LIBRARIES bf_intern_glew_mx bf_intern_guardedalloc ${GLEW_LIBRARY})
+endif()
+
 list(APPEND ALL_CYCLES_LIBRARIES
        ${BOOST_LIBRARIES}
        ${PNG_LIBRARIES}
index 3fc086cbc0c50a4bf51d48a28c3d7f1affdff454..fc78bda6df33b05668f0d85dcbd499dabc98b02e 100644 (file)
@@ -160,8 +160,10 @@ protected:
        util_logging_verbosity_set(1); \
        ScopedMockLog mock_log_name; \
        DeviceInfo device_info; \
+       Stats stats; \
+       Device *device_cpu = Device::create(device_info, stats, true); \
        SceneParams scene_params; \
-       Scene scene(scene_params, device_info); \
+       Scene scene(scene_params, device_cpu); \
        ShaderGraph graph; \
        ShaderGraphBuilder builder(&graph); \