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 #426

Merged
merged 6 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ find_package(gz-cmake3 REQUIRED)
#============================================================================
# Configure the project
#============================================================================
set(CMAKE_CXX_STANDARD 17)

set(CMAKE_CXX_STANDARD_REQUIRED ON)
gz_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/gui
VERSION_SUFFIX pre1)
Expand Down
1 change: 0 additions & 1 deletion include/gz/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ gz_create_core_library(SOURCES
${sources}
${headers_MOC}
${resources_RCC}
CXX_STANDARD 17
)

target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
Expand Down
2 changes: 1 addition & 1 deletion src/Application_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <gz/common/Console.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/Dialog.hh"
#include "gz/gui/MainWindow.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/Conversions_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <gz/common/MouseEvent.hh>
#include <gz/math/Color.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Conversions.hh"

using namespace gz;
Expand Down
2 changes: 1 addition & 1 deletion src/DragDropModel_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <gz/common/Console.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)

#include "gz/gui/Enums.hh"
#include "gz/gui/DragDropModel.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/GuiEvents_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <gtest/gtest.h>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/GuiEvents.hh"

using namespace gz;
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <gz/math/Helpers.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/MainWindow.hh"
#include "gz/gui/Helpers.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/MainWindow_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <gz/transport/Node.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/MainWindow.hh"
#include "gz/gui/Plugin.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/PlottingInterface_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <gz/transport.hh>
#include <gz/common/Console.hh>
#include <gz/utils/ExtraTestMacros.hh>
#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Enums.hh"
#include "gz/gui/PlottingInterface.hh"

Expand Down
2 changes: 1 addition & 1 deletion src/Plugin_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <gz/common/Console.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/MainWindow.hh"
#include "gz/gui/Plugin.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/SearchModel_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <gz/common/Console.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)

#include "gz/gui/Enums.hh"
#include "gz/gui/SearchModel.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/gz_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <gz/common/Util.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)

#ifdef _MSC_VER
# define popen _popen
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/point_cloud/PointCloud_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <gz/common/Filesystem.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/MainWindow.hh"
#include "gz/gui/Plugin.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/publisher/Publisher_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <gz/transport/Node.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/Plugin.hh"
#include "gz/gui/MainWindow.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/screenshot/Screenshot_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <gz/transport/Node.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/GuiEvents.hh"
#include "gz/gui/MainWindow.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/shutdown_button/ShutdownButton_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <gz/transport/Node.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/Plugin.hh"
#include "gz/gui/MainWindow.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/teleop/Teleop_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/Plugin.hh"
#include "gz/gui/MainWindow.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/topic_viewer/TopicViewer_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <gz/transport/Node.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/Plugin.hh"
#include "gz/gui/MainWindow.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/world_control/WorldControl_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <gz/transport/Node.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/MainWindow.hh"
#include "gz/gui/Plugin.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/world_stats/WorldStats_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <gz/transport/Node.hh>
#include <gz/utils/ExtraTestMacros.hh>

#include "test_config.h" // NOLINT(build/include)
#include "test_config.hh" // NOLINT(build/include)
#include "gz/gui/Application.hh"
#include "gz/gui/Plugin.hh"
#include "gz/gui/MainWindow.hh"
Expand Down
22 changes: 5 additions & 17 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
configure_file (test_config.hh.in
${PROJECT_BINARY_DIR}/include/test_config.hh
)
include_directories (
${PROJECT_SOURCE_DIR}/test/gtest/include
${PROJECT_SOURCE_DIR}/test/gtest
${PROJECT_SOURCE_DIR}/test
${PROJECT_BINARY_DIR}
${PROJECT_BINARY_DIR}/include
)

configure_file (test_config.h.in ${PROJECT_BINARY_DIR}/test_config.h)

# 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")

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(helpers)
add_subdirectory(integration)
add_subdirectory(performance)
Expand Down
Loading