]> git.zndr.dk Git - unittest.git/commitdiff
Fix gtest_main target
authorJannik ZANDER <jzander@grundfos.com>
Fri, 10 Feb 2017 18:24:17 +0000 (19:24 +0100)
committerJannik ZANDER <jzander@grundfos.com>
Fri, 10 Feb 2017 18:24:17 +0000 (19:24 +0100)
AddUnitTest.cmake

index da74bf924d72ab36c79a539d870be4115aac4945..05f52ffee83aa466131d4da677629d7a42a8ad30 100644 (file)
@@ -40,8 +40,7 @@ function(add_unittest)
   foreach(inc ${my_INCS})\r
     target_include_directories(${my_TARGET} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${inc}")\r
   endforeach()\r
-  target_include_directories(${my_TARGET} PUBLIC "${GTEST_INCLUDE_DIRS}")\r
-  target_link_libraries(${my_TARGET} PUBLIC "${my_DEPS}" ${GTEST_BOTH_LIBRARIES})\r
+  target_link_libraries(${my_TARGET} PUBLIC "${my_DEPS}" gtest gtest_main)\r
 \r
   # Add test to test suite\r
   add_test(${my_TARGET} ${my_TARGET})\r