Cycles: Add some utility tests using GTests
[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         ../util
18 )
19
20 include_directories(${INC})
21
22 link_directories(${BOOST_LIBPATH})
23 link_directories(${OPENIMAGEIO_LIBPATH})
24
25 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
26 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
27
28 CYCLES_TEST(util_aligned_malloc "cycles_util")
29 CYCLES_TEST(util_path "cycles_util;${BOOST_LIBRARIES};${OPENIMAGEIO_LIBRARIES}")
30 CYCLES_TEST(util_string "cycles_util;${BOOST_LIBRARIES}")