Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GoogleTest to latest version #91

Merged
merged 5 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ 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/plugin
VERSION_SUFFIX pre0)


#============================================================================
# Set project-specific options
#============================================================================

# No project-specific options yet for ign-plugin

#============================================================================
# Search for project-specific dependencies
#============================================================================
Expand Down
2 changes: 1 addition & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gz_get_libsources_and_unittests(sources tests)
# Create the library target
gz_create_core_library(
SOURCES ${sources}
CXX_STANDARD 17)
)

target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER})
Expand Down
7 changes: 0 additions & 7 deletions core/src/Factory_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,3 @@ TEST(Factory, ProducerWithVector)
VectorProducer producer;
EXPECT_NE(nullptr, producer.Construct(std::vector<double>()));
}

/////////////////////////////////////////////////
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
6 changes: 0 additions & 6 deletions core/src/Info_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,3 @@ TEST(Info, Clear)
EXPECT_FALSE(static_cast<bool>(info.factory));
EXPECT_FALSE(static_cast<bool>(info.deleter));
}

int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
7 changes: 0 additions & 7 deletions core/src/utility_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,3 @@ TEST(Demangle, FakeSymbol)
// will skip this test.
#endif
}

/////////////////////////////////////////////////
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
7 changes: 0 additions & 7 deletions loader/src/Loader_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,3 @@ TEST(Loader, ForgetUnloadedLibrary)

EXPECT_FALSE(loader.ForgetLibrary(GzDummyPlugins_LIB));
}

/////////////////////////////////////////////////
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
20 changes: 1 addition & 19 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +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_property(TARGET gtest_main PROPERTY CXX_STANDARD ${c++standard})
set_property(TARGET gtest PROPERTY CXX_STANDARD ${c++standard})
set(GTEST_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest.a")
set(GTEST_MAIN_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest_main.a")

execute_process(COMMAND cmake -E remove_directory ${CMAKE_BINARY_DIR}/test_results)
execute_process(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/test_results)
include_directories(${GTEST_INCLUDE_DIRS})

add_subdirectory(gtest_vendor)
add_subdirectory(integration)
add_subdirectory(static_assertions)
add_subdirectory(plugins)
280 changes: 0 additions & 280 deletions test/gtest/cmake/internal_utils.cmake

This file was deleted.

Loading