Include third_party/gtest/include as -I only one time.

This commit is contained in:
David Capello 2010-12-12 09:53:39 -03:00
parent 1d5274d435
commit 8e54e0cbd5

View File

@ -275,6 +275,9 @@ endif()
file(GLOB_RECURSE tests *_unittest.cpp)
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
foreach(testsourcefile ${tests})
get_filename_component(testname ${testsourcefile} NAME_WE)
@ -282,9 +285,6 @@ foreach(testsourcefile ${tests})
target_link_libraries(${testname} gtest ${all_libs})
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
add_custom_target(run_${testname}
COMMAND ${testname})