mirror of
https://github.com/google/benchmark.git
synced 2024-11-28 15:34:33 +00:00
This reverts commit 609752306f
.
This commit is contained in:
parent
609752306f
commit
8356d646bf
|
@ -75,10 +75,12 @@ macro(build_external_gtest)
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro(build_external_gtest)
|
endmacro(build_external_gtest)
|
||||||
|
|
||||||
macro(build_gtest_from_dir)
|
if (BENCHMARK_ENABLE_GTEST_TESTS)
|
||||||
|
if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/googletest)
|
||||||
|
set(GTEST_ROOT "${CMAKE_SOURCE_DIR}/googletest")
|
||||||
set(INSTALL_GTEST OFF CACHE INTERNAL "")
|
set(INSTALL_GTEST OFF CACHE INTERNAL "")
|
||||||
set(INSTALL_GMOCK OFF CACHE INTERNAL "")
|
set(INSTALL_GMOCK OFF CACHE INTERNAL "")
|
||||||
add_subdirectory(${GTEST_ROOT} build)
|
add_subdirectory(${CMAKE_SOURCE_DIR}/googletest)
|
||||||
set(GTEST_BOTH_LIBRARIES gtest gmock gmock_main)
|
set(GTEST_BOTH_LIBRARIES gtest gmock gmock_main)
|
||||||
foreach(HEADER test mock)
|
foreach(HEADER test mock)
|
||||||
# CMake 2.8 and older don't respect INTERFACE_INCLUDE_DIRECTORIES, so we
|
# CMake 2.8 and older don't respect INTERFACE_INCLUDE_DIRECTORIES, so we
|
||||||
|
@ -94,15 +96,6 @@ macro(build_gtest_from_dir)
|
||||||
endif()
|
endif()
|
||||||
list(APPEND GTEST_INCLUDE_DIRS ${HEADER_PATH_${HEADER}})
|
list(APPEND GTEST_INCLUDE_DIRS ${HEADER_PATH_${HEADER}})
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
|
||||||
|
|
||||||
if (BENCHMARK_ENABLE_GTEST_TESTS)
|
|
||||||
if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/googletest)
|
|
||||||
set(GTEST_ROOT "${CMAKE_SOURCE_DIR}/googletest")
|
|
||||||
build_gtest_from_dir()
|
|
||||||
elseif (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest)
|
|
||||||
set(GTEST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/googletest")
|
|
||||||
build_gtest_from_dir()
|
|
||||||
elseif(BENCHMARK_DOWNLOAD_DEPENDENCIES)
|
elseif(BENCHMARK_DOWNLOAD_DEPENDENCIES)
|
||||||
build_external_gtest()
|
build_external_gtest()
|
||||||
else()
|
else()
|
||||||
|
|
Loading…
Reference in a new issue