refact: Move GTest to third_party folder
This commit is contained in:
parent
7ed762bd87
commit
07cd523514
|
@ -1,5 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.10) # 设置cmake项目需要的cmake最小版本
|
cmake_minimum_required(VERSION 3.10) # 设置cmake项目需要的cmake最小版本
|
||||||
|
|
||||||
|
add_subdirectory(third_party/GTest)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
add_subdirectory(all_test)
|
add_subdirectory(all_test)
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,6 @@ project(bus_test)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
add_subdirectory(./GTest)
|
|
||||||
|
|
||||||
include_directories(GTest/googletest/include)
|
|
||||||
include_directories(GTest/googlemock/include)
|
|
||||||
include_directories(../include)
|
include_directories(../include)
|
||||||
|
|
||||||
aux_source_directory("../src/" SRCS)
|
aux_source_directory("../src/" SRCS)
|
||||||
|
|
|
@ -26,7 +26,7 @@ option(BUILD_GMOCK "Builds the googlemock subproject" ON)
|
||||||
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
|
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
|
||||||
|
|
||||||
if(BUILD_GMOCK)
|
if(BUILD_GMOCK)
|
||||||
add_subdirectory( googlemock )
|
add_subdirectory(googlemock)
|
||||||
else()
|
else()
|
||||||
add_subdirectory( googletest )
|
add_subdirectory(googletest)
|
||||||
endif()
|
endif()
|
|
@ -312,7 +312,7 @@ endfunction()
|
||||||
# Installs the specified targets and configures the associated pkgconfig files.
|
# Installs the specified targets and configures the associated pkgconfig files.
|
||||||
function(install_project)
|
function(install_project)
|
||||||
if(INSTALL_GTEST)
|
if(INSTALL_GTEST)
|
||||||
install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/"
|
install(DIRECTORY "../../../../include"
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||||
# Install the project targets.
|
# Install the project targets.
|
||||||
install(TARGETS ${ARGN}
|
install(TARGETS ${ARGN}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user