Commit 8b7c96e7 authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #136 from iovisor/gtest-external-rename

cmake: rename gtest external project target
parents 5ef6e080 7b5a357d
...@@ -37,7 +37,7 @@ find_package(Threads REQUIRED) ...@@ -37,7 +37,7 @@ find_package(Threads REQUIRED)
if (OFFLINE_BUILDS) if (OFFLINE_BUILDS)
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(gtest ExternalProject_Add(gtest-git
GIT_REPOSITORY https://github.com/google/googletest.git GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.8.1 GIT_TAG release-1.8.1
STEP_TARGETS build update STEP_TARGETS build update
...@@ -46,15 +46,15 @@ if (OFFLINE_BUILDS) ...@@ -46,15 +46,15 @@ if (OFFLINE_BUILDS)
) )
else() else()
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(gtest ExternalProject_Add(gtest-git
GIT_REPOSITORY https://github.com/google/googletest.git GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.8.1 GIT_TAG release-1.8.1
STEP_TARGETS build update STEP_TARGETS build update
EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_ALL 1
) )
endif() endif()
add_dependencies(bpftrace_test gtest-build) add_dependencies(bpftrace_test gtest-git-build)
ExternalProject_Get_Property(gtest source_dir binary_dir) ExternalProject_Get_Property(gtest-git source_dir binary_dir)
target_include_directories(bpftrace_test PUBLIC ${source_dir}/googletest/include) target_include_directories(bpftrace_test PUBLIC ${source_dir}/googletest/include)
target_include_directories(bpftrace_test PUBLIC ${source_dir}/googlemock/include) target_include_directories(bpftrace_test PUBLIC ${source_dir}/googlemock/include)
target_link_libraries(bpftrace_test ${binary_dir}/googlemock/gtest/libgtest.a) target_link_libraries(bpftrace_test ${binary_dir}/googlemock/gtest/libgtest.a)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment