[Bf-blender-cvs] [e1f5b2b] master: Fix GTests compilations on Windows

Sergey Sharybin noreply at git.blender.org
Sat Feb 6 15:14:15 CET 2016


Commit: e1f5b2b4c11a5081704e889c1800383868f6f855
Author: Sergey Sharybin
Date:   Sat Feb 6 15:03:32 2016 +0100
Branches: master
https://developer.blender.org/rBe1f5b2b4c11a5081704e889c1800383868f6f855

Fix GTests compilations on Windows

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.

===================================================================

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

===================================================================

diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake
index 16882a6..3ccca1f 100644
--- a/build_files/cmake/Modules/GTestTesting.cmake
+++ b/build_files/cmake/Modules/GTestTesting.cmake
@@ -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
diff --git a/tests/gtests/testing/CMakeLists.txt b/tests/gtests/testing/CMakeLists.txt
index 796f975..1eb60e7 100644
--- a/tests/gtests/testing/CMakeLists.txt
+++ b/tests/gtests/testing/CMakeLists.txt
@@ -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}")




More information about the Bf-blender-cvs mailing list