Skip to content

Commit

Permalink
Merge branch 'main' into jrivero/win/remove_visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
chapulina authored Jan 25, 2021
2 parents 09d71e7 + 63a88dc commit f077fbb
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 41 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,15 @@ ign_find_package(ignition-tools

#--------------------------------------
# Find protobuf
# Module is needed to use the PROTOBUF_GENERATE_CPP
set(protobuf_MODULE_COMPATIBLE TRUE)
set(REQ_PROTOBUF_VER 3)
ign_find_package(IgnProtobuf
VERSION ${REQ_PROTOBUF_VER}
REQUIRED
COMPONENTS all
PRETTY Protobuf)
set(PROTOBUF_IMPORT_DIRS ${ignition-msgs7_INCLUDE_DIRS})
set(Protobuf_IMPORT_DIRS ${ignition-msgs7_INCLUDE_DIRS})

# Plugin install dirs
set(IGNITION_GAZEBO_PLUGIN_INSTALL_DIR
Expand Down
1 change: 1 addition & 0 deletions include/ignition/gazebo/EntityComponentManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <map>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <typeinfo>
Expand Down
6 changes: 3 additions & 3 deletions include/ignition/gazebo/EventManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ namespace ignition
/// occur.
///
/// See \ref ignition::gazebo::events for a complete list of events.
class IGNITION_GAZEBO_VISIBLE EventManager
class EventManager
{
/// \brief Constructor
public: EventManager();
public: EventManager() = default;

/// \brief Destructor
public: ~EventManager();
public: ~EventManager() = default;

/// \brief Add a connection to an event.
/// \param[in] _subscriber A std::function callback function. The function
Expand Down
1 change: 1 addition & 0 deletions include/ignition/gazebo/Server.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <ignition/gazebo/config.hh>
#include <ignition/gazebo/EntityComponentManager.hh>
Expand Down
1 change: 1 addition & 0 deletions include/ignition/gazebo/World.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define IGNITION_GAZEBO_WORLD_HH_

#include <memory>
#include <optional>
#include <string>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions include/ignition/gazebo/detail/EntityComponentManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <cstring>
#include <map>
#include <optional>
#include <set>
#include <type_traits>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions include/ignition/gazebo/gui/GuiRunner.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace gazebo
inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
/// \brief Responsible for running GUI systems as new states are received from
/// the backend.

class IGNITION_GAZEBO_GUI_VISIBLE GuiRunner : public QObject
{
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion include/ignition/gazebo/gui/GuiSystem.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace gazebo
/// GUI systems are different from `ignition::gazebo::System`s because they
/// don't run in the same process as the physics. Instead, they run in a
/// separate process that is stepped by updates coming through the network
class IGNITION_GAZEBO_VISIBLE GuiSystem : public ignition::gui::Plugin
class GuiSystem : public ignition::gui::Plugin
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion include/ignition/gazebo/gui/TmpIface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace ignition
/// Move API from here to their appropriate locations once that's known.
///
/// This class should be removed before releasing!
class IGNITION_GAZEBO_VISIBLE TmpIface : public QObject
class TmpIface : public QObject
{
Q_OBJECT

Expand Down
12 changes: 10 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ set (sources
Barrier.cc
Conversions.cc
EntityComponentManager.cc
EventManager.cc
LevelManager.cc
Link.cc
Model.cc
Expand Down Expand Up @@ -85,6 +84,15 @@ set (gtest_sources
network/NetworkManager_TEST.cc
)

if (MSVC)
# Warning #4251 is the "dll-interface" warning that tells you when types used
# by a class are not being exported. These generated source files have private
# members that don't get exported, so they trigger this warning. However, the
# warning is not important since those members do not need to be interfaced
# with.
set_source_files_properties(${sources} ${gtest_sources} COMPILE_FLAGS "/wd4251 /wd4146")
endif()

# Create the library target
ign_create_core_library(SOURCES ${sources} CXX_STANDARD 17)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
Expand All @@ -101,7 +109,7 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PRIVATE
ignition-plugin${IGN_PLUGIN_VER}::loader
)
if (NOT APPLE)
if (UNIX AND NOT APPLE)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PRIVATE stdc++fs)
endif()
Expand Down
26 changes: 0 additions & 26 deletions src/EventManager.cc

This file was deleted.

1 change: 1 addition & 0 deletions src/SdfGenerator.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <ignition/msgs/sdf_generator_config.pb.h>

#include <sdf/Element.hh>
#include <optional>
#include <string>
#include <unordered_map>

Expand Down
2 changes: 2 additions & 0 deletions src/Server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*
*/

#include <numeric>

#include <ignition/common/SystemPaths.hh>
#include <ignition/fuel_tools/Interface.hh>
#include <ignition/fuel_tools/ClientConfig.hh>
Expand Down
1 change: 1 addition & 0 deletions src/ServerPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <condition_variable>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <thread>
#include <unordered_map>
Expand Down
1 change: 1 addition & 0 deletions src/SimulationRunner.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <functional>
#include <list>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include <unordered_set>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/GuiFileHandler.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
namespace gui
{
/// \brief Class for handling saving and loading of SDFormat files
class IGNITION_GAZEBO_VISIBLE GuiFileHandler : public QObject
class GuiFileHandler : public QObject
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion src/gui/PathManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace gui
/// \brief Class for handling paths and their environment variables.
/// It queries the server for paths at startup, and keeps paths updated
/// whenever they change in the server.
class IGNITION_GAZEBO_VISIBLE PathManager : public QObject
class PathManager : public QObject
{
Q_OBJECT

Expand Down
1 change: 1 addition & 0 deletions src/gui/plugins/align_tool/AlignTool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <queue>
#include <string>
#include <vector>

#include <ignition/gui/Application.hh>
#include <ignition/gui/MainWindow.hh>
#include <ignition/common/Console.hh>
Expand Down
1 change: 1 addition & 0 deletions src/gui/plugins/resource_spawner/ResourceSpawner.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef IGNITION_GAZEBO_GUI_RESOURCE_SPAWNER_HH_
#define IGNITION_GAZEBO_GUI_RESOURCE_SPAWNER_HH_

#include <algorithm>
#include <memory>
#include <string>
#include <vector>
Expand Down
14 changes: 9 additions & 5 deletions src/systems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ function(gz_add_system system_name)
# files, we also install an unversioned symlink into the same versioned folder.
set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${system_target}${CMAKE_SHARED_LIBRARY_SUFFIX})
set(unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${system_name}${CMAKE_SHARED_LIBRARY_SUFFIX})
if (WIN32)
# create_symlink requires cmake 3.13 on windows
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
if(WIN32)
# symlinks on Windows require admin priviledges, fallback to copy
ADD_CUSTOM_COMMAND(TARGET ${system_target} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:${system_target}>"
"$<TARGET_FILE_DIR:${system_target}>/${unversioned}")
else()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${IGNITION_GAZEBO_PLUGIN_INSTALL_DIR})
endif()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${IGNITION_GAZEBO_PLUGIN_INSTALL_DIR})
endfunction()

add_subdirectory(air_pressure)
Expand Down
2 changes: 2 additions & 0 deletions test/integration/entity_erase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include <gtest/gtest.h>

#include <optional>

#include "ignition/gazebo/Server.hh"
#include "ignition/gazebo/test_config.hh" // NOLINT(build/include)

Expand Down

0 comments on commit f077fbb

Please sign in to comment.