Fix GTests compilations on Windows
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 6 Feb 2016 14:03:32 +0000 (15:03 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 6 Feb 2016 14:12:28 +0000 (15:12 +0100)
Unfortunately this doesn't make all tests compilable due
to all sort of weird and wonderful bad levels includes
on Windows (G referenced from bf_blenlib) but at least
allows to selectively build tests for now.

build_files/cmake/Modules/GTestTesting.cmake
tests/gtests/testing/CMakeLists.txt

index 16882a683a355e991dcda7a691b4178079533669..3ccca1f199c4ff259f987370077510d83077df4e 100644 (file)
@@ -29,6 +29,7 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
                add_executable(${NAME}_test ${SRC})
                target_link_libraries(${NAME}_test
                                      ${EXTRA_LIBS}
+                                     ${PLATFORM_LINKLIBS}
                                      bf_testing_main
                                      bf_intern_guardedalloc
                                      extern_gtest
index 796f975ea6561a1916a47d97d97b3311cfc9938f..1eb60e7f3b51f950d701b2d447d3e0668584ea03 100644 (file)
@@ -47,4 +47,7 @@ set(SRC
        testing.h
 )
 
+add_definitions(${GFLAGS_DEFINES})
+add_definitions(${GLOG_DEFINES})
+
 blender_add_lib(bf_testing_main "${SRC}" "${INC}" "${INC_SYS}")