Skip to content

Commit

Permalink
Bumps in ionic : ci_matching_branch/bump_ionic_gz-plugin3
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey committed Oct 6, 2023
1 parent 6aed7bb commit 6697395
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 48 deletions.
6 changes: 3 additions & 3 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libgz-cmake3-dev
libgz-tools2-dev
libgz-utils2-cli-dev
libgz-cmake4-dev
libgz-tools3-dev
libgz-utils3-cli-dev
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ project(gz-plugin3 VERSION 3.0.0)
#============================================================================
# Find gz-cmake
#============================================================================
find_package(gz-cmake3 REQUIRED)
set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})
find_package(gz-cmake4 REQUIRED)
set(GZ_CMAKE_VER ${gz-cmake4_VERSION_MAJOR})

#============================================================================
# Configure the project
Expand Down Expand Up @@ -49,8 +49,8 @@ set(GZ_TOOLS_VER 2)

#--------------------------------------
# Find gz-utils
gz_find_package(gz-utils2 REQUIRED COMPONENTS cli)
set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR})
gz_find_package(gz-utils3 REQUIRED COMPONENTS cli)
set(GZ_UTILS_VER ${gz-utils3_VERSION_MAJOR})

#============================================================================
# Configure the build
Expand Down
10 changes: 5 additions & 5 deletions MigrationFromCommon.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ framework. Some of the instructions here may also be useful to new adopters of
just wants to use `PluginPtr` objects can link to `core`, e.g.:

```
target_link_libraries(my_target PUBLIC gz-plugin2::core)
target_link_libraries(my_target PUBLIC gz-plugin3::core)
```

However, if your code wants to be able to load plugins, it should link to the
`loader` component. In most cases, it should probably link privately, unless you
need the `gz::plugin::Loader` class to be part of your library's API:

```
target_link_libraries(my_target PRIVATE gz-plugin2::loader)
target_link_libraries(my_target PRIVATE gz-plugin3::loader)
```

If `gz::plugin::PluginPtr` objects are part of your library's API, then
Expand All @@ -28,9 +28,9 @@ you may want `loader` to be private while `core` is public:
```
target_link_libraries(my_target
PUBLIC
gz-plugin2::core
gz-plugin3::core
PRIVATE
gz-plugin2::loader
gz-plugin3::loader
)
```

Expand All @@ -39,7 +39,7 @@ then you should link against the `register` component. This should almost always
be a private link, since plugin registration is purely internal for a library:

```
target_link_libraries(my_plugin PRIVATE gz-plugin2::register)
target_link_libraries(my_plugin PRIVATE gz-plugin3::register)
```

# Registering a plugin
Expand Down
8 changes: 4 additions & 4 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ project(examples)
find_package(gz-plugin3 QUIET REQUIRED COMPONENTS all)
set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})

find_package(gz-common5 QUIET)
set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR})
find_package(gz-common6 QUIET)
set(GZ_COMMON_VER ${gz-common6_VERSION_MAJOR})

find_package(gz-math7 QUIET)
set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR})
find_package(gz-math8 QUIET)
set(GZ_MATH_VER ${gz-math8_VERSION_MAJOR})

add_subdirectory(plugins)

Expand Down
4 changes: 2 additions & 2 deletions loader/conf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(gz_library_path "${CMAKE_BINARY_DIR}/test/lib/$<CONFIG>/ruby/gz/cmd${GZ_DESI

# Generate a configuration file for internal testing.
# Note that the major version of the library is included in the name.
# Ex: plugin2.yaml
# Ex: plugin3.yaml
configure_file(
"${GZ_DESIGNATION}.yaml.in"
"${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured" @ONLY)
Expand All @@ -17,7 +17,7 @@ set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmd${GZ_DESIGNATION}${P

# Generate the configuration file that is installed.
# Note that the major version of the library is included in the name.
# Ex: plugin2.yaml
# Ex: plugin3.yaml
configure_file(
"${GZ_DESIGNATION}.yaml.in"
"${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml" @ONLY)
Expand Down
4 changes: 2 additions & 2 deletions loader/src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ install(
#===============================================================================
# Generate the ruby script for internal testing.
# Note that the major version of the library is included in the name.
# Ex: cmdplugin2.rb
# Ex: cmdplugin3.rb
set(cmd_script_generated_test "${CMAKE_BINARY_DIR}/test/lib/$<CONFIG>/ruby/gz/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb")
set(cmd_script_configured_test "${CMAKE_CURRENT_BINARY_DIR}/test_cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb.configured")

Expand All @@ -46,7 +46,7 @@ file(GENERATE
# Used for the installed version.
# Generate the ruby script that gets installed.
# Note that the major version of the library is included in the name.
# Ex: cmdplugin2.rb
# Ex: cmdplugin3.rb
set(cmd_script_generated "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb")
set(cmd_script_configured "${CMAKE_CURRENT_BINARY_DIR}/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb.configured")

Expand Down
46 changes: 23 additions & 23 deletions test/integration/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,54 +257,54 @@ void TestSetAndMapUsage(
const gz::plugin::PluginPtr &plugin)
{
PluginPtrType1 plugin1 = plugin;
PluginPtrType2 plugin2 = plugin1;
PluginPtrType2 plugin3 = plugin1;

EXPECT_TRUE(plugin1 == plugin);
EXPECT_TRUE(plugin1 == plugin2);
EXPECT_FALSE(plugin1 != plugin2);
EXPECT_TRUE(plugin1 == plugin3);
EXPECT_FALSE(plugin1 != plugin3);

EXPECT_TRUE(plugin2 == plugin);
EXPECT_TRUE(plugin2 == plugin1);
EXPECT_FALSE(plugin2 != plugin1);
EXPECT_TRUE(plugin3 == plugin);
EXPECT_TRUE(plugin3 == plugin1);
EXPECT_FALSE(plugin3 != plugin1);

std::set<gz::plugin::PluginPtr> orderedSet;
EXPECT_TRUE(orderedSet.insert(plugin1).second);
EXPECT_FALSE(orderedSet.insert(plugin1).second);
EXPECT_FALSE(orderedSet.insert(plugin2).second);
EXPECT_FALSE(orderedSet.insert(plugin3).second);

std::unordered_set<gz::plugin::PluginPtr> unorderedSet;
EXPECT_TRUE(unorderedSet.insert(plugin1).second);
EXPECT_FALSE(unorderedSet.insert(plugin1).second);
EXPECT_FALSE(unorderedSet.insert(plugin2).second);
EXPECT_FALSE(unorderedSet.insert(plugin3).second);

std::map<gz::plugin::PluginPtr, std::string> orderedMap;
EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin1, "some string")).second);
EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin1, "a string")).second);
EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin2, "chars")).second);
EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin3, "chars")).second);

std::unordered_map<gz::plugin::PluginPtr, std::string> unorderedMap;
EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin1, "strings")).second);
EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin1, "letters")).second);
EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin2, "")).second);
EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin3, "")).second);


plugin2 = loader.Instantiate("test::util::DummyMultiPlugin");
EXPECT_TRUE(plugin1 != plugin2);
EXPECT_FALSE(plugin1 == plugin2);
EXPECT_TRUE(plugin2 != plugin1);
EXPECT_FALSE(plugin2 == plugin1);
plugin3 = loader.Instantiate("test::util::DummyMultiPlugin");
EXPECT_TRUE(plugin1 != plugin3);
EXPECT_FALSE(plugin1 == plugin3);
EXPECT_TRUE(plugin3 != plugin1);
EXPECT_FALSE(plugin3 == plugin1);

EXPECT_TRUE(orderedSet.insert(plugin2).second);
EXPECT_FALSE(orderedSet.insert(plugin2).second);
EXPECT_TRUE(orderedSet.insert(plugin3).second);
EXPECT_FALSE(orderedSet.insert(plugin3).second);

EXPECT_TRUE(unorderedSet.insert(plugin2).second);
EXPECT_FALSE(unorderedSet.insert(plugin2).second);
EXPECT_TRUE(unorderedSet.insert(plugin3).second);
EXPECT_FALSE(unorderedSet.insert(plugin3).second);

EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin2, "letters")).second);
EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin2, "chars")).second);
EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin3, "letters")).second);
EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin3, "chars")).second);

EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin2, "abc")).second);
EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin2, "def")).second);
EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin3, "abc")).second);
EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin3, "def")).second);
}

/////////////////////////////////////////////////
Expand Down
10 changes: 5 additions & 5 deletions tutorials/02_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
On Ubuntu systems, `apt-get` can be used to install `gz-plugin`:
```bash
sudo apt-get update
sudo apt install libgz-plugin2-dev
sudo apt install libgz-plugin3-dev
```

## Source Installation

1. Install Gazebo dependencies
```
sudo apt-get install libgz-cmake3-dev libgz-tools2-dev libgz-utils2-cli-dev
sudo apt-get install libgz-cmake4-dev libgz-tools3-dev libgz-utils3-cli-dev
```

1. Install Gazebo Tools if you want to use the `gz plugin` command line tool:
```bash
sudo apt-get install gz-tools2
sudo apt-get install gz-tools3
```

2. Clone the repository
Expand Down Expand Up @@ -91,15 +91,15 @@ Sierra (10.12) or later.
2. Run the following commands
```bash
brew tap osrf/simulation
brew install gz-plugin2
brew install gz-plugin3
```

## Source Installation

1. Install dependencies
```bash
brew tap osrf/simulation
brew install gz-plugin2 --only-dependencies
brew install gz-plugin3 --only-dependencies
```

2. Clone the repository
Expand Down

0 comments on commit 6697395

Please sign in to comment.