Skip to content

Commit

Permalink
Update GoogleTest to latest version (#361)
Browse files Browse the repository at this point in the history
* Remove old gtest version
* Add new vendored Googletest version
* CMake updates for new googletest version
* Remove all gtest_main functions
* Update test/CMakeLists.txt

Signed-off-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
  • Loading branch information
mjcarroll and ahcorde authored Jun 28, 2022
1 parent 22e0f02 commit 4416bee
Show file tree
Hide file tree
Showing 60 changed files with 5,843 additions and 15,703 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})
#============================================================================
# Configure the project
#============================================================================
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

gz_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/common
VERSION_SUFFIX pre1)

#============================================================================
# Set project-specific options
#============================================================================
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

#--------------------------------------
# Option: Should Windows test symlinking?
if(WIN32)
Expand Down
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ gz_get_libsources_and_unittests(sources gtest_sources)

# Create the library target
gz_create_core_library(
SOURCES ${sources}
CXX_STANDARD 17)
SOURCES ${sources})

if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(CXX_FILESYSTEM_LIBRARIES stdc++fs)
Expand Down
15 changes: 1 addition & 14 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
include_directories(
${PROJECT_SOURCE_DIR}/test/gtest/include
${PROJECT_SOURCE_DIR}/test/gtest
${PROJECT_SOURCE_DIR}/test
)

# Build gtest
add_library(gtest STATIC gtest/src/gtest-all.cc)
add_library(gtest_main STATIC gtest/src/gtest_main.cc)

target_link_libraries(gtest_main gtest)
set(GTEST_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest.a")
set(GTEST_MAIN_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest_main.a")

add_subdirectory(gtest_vendor)
add_subdirectory(integration)
add_subdirectory(performance)
add_subdirectory(regression)
Expand Down
9 changes: 0 additions & 9 deletions test/gtest/cmake/Config.cmake.in

This file was deleted.

10 changes: 0 additions & 10 deletions test/gtest/cmake/gtest.pc.in

This file was deleted.

11 changes: 0 additions & 11 deletions test/gtest/cmake/gtest_main.pc.in

This file was deleted.

Loading

0 comments on commit 4416bee

Please sign in to comment.