Revert "Cycles Tests: Add test for correct 16 byte alignment of KernelData structs"
[blender.git] / intern / cycles / test / CMakeLists.txt
1 if(WITH_GTESTS)
2         Include(GTestTesting)
3
4         # Otherwise we get warnings here that we cant fix in external projects
5         remove_strict_flags()
6 endif()
7
8 macro(CYCLES_TEST SRC EXTRA_LIBS)
9         if(WITH_GTESTS)
10                 BLENDER_SRC_GTEST("cycles_${SRC}" "${SRC}_test.cpp" "${EXTRA_LIBS}")
11         endif()
12 endmacro()
13
14 set(INC
15         .
16         ..
17         ../device
18         ../graph
19         ../kernel
20         ../render
21         ../util
22 )
23
24 set(ALL_CYCLES_LIBRARIES
25         cycles_render
26         cycles_device
27         cycles_bvh
28         cycles_graph
29         cycles_subd
30         cycles_util
31         ${OPENIMAGEIO_LIBRARIES}
32 )
33 if(WITH_CYCLES_OSL)
34         list(APPEND ALL_CYCLES_LIBRARIES
35                 cycles_kernel_osl
36                 ${OSL_LIBRARIES}
37                 ${LLVM_LIBRARIES}
38         )
39 endif()
40 if(WITH_IMAGE_OPENJPEG AND NOT WITH_SYSTEM_OPENJPEG)
41         list(APPEND ALL_CYCLES_LIBRARIES
42                 extern_openjpeg
43         )
44 endif()
45 if(WITH_CYCLES_OPENSUBDIV)
46         add_definitions(-DWITH_OPENSUBDIV)
47         include_directories(
48                 SYSTEM
49                 ${OPENSUBDIV_INCLUDE_DIR}
50         )
51         list(APPEND ALL_CYCLES_LIBRARIES
52                 ${OPENSUBDIV_LIBRARIES}
53         )
54 endif()
55 list(APPEND ALL_CYCLES_LIBRARIES
56         ${BOOST_LIBRARIES}
57 )
58
59 include_directories(${INC})
60
61 link_directories(${BOOST_LIBPATH})
62 link_directories(${OPENIMAGEIO_LIBPATH})
63
64 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
65 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
66
67 CYCLES_TEST(render_graph_finalize "${ALL_CYCLES_LIBRARIES}")
68 CYCLES_TEST(util_aligned_malloc "cycles_util")
69 CYCLES_TEST(util_path "cycles_util;${BOOST_LIBRARIES};${OPENIMAGEIO_LIBRARIES}")
70 CYCLES_TEST(util_string "cycles_util;${BOOST_LIBRARIES}")
71 CYCLES_TEST(util_task "cycles_util;${BOOST_LIBRARIES}")