Skip to content

Commit

Permalink
Revert "bazel: updates for garden (#513)"
Browse files Browse the repository at this point in the history
This reverts commit 1016539.

Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored and scpeters committed Feb 6, 2024
1 parent 1016539 commit ea90ada
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 537 deletions.
130 changes: 0 additions & 130 deletions BUILD.bazel

This file was deleted.

45 changes: 0 additions & 45 deletions bullet-featherstone/BUILD.bazel

This file was deleted.

55 changes: 0 additions & 55 deletions dartsim/BUILD.bazel

This file was deleted.

1 change: 0 additions & 1 deletion include/gz/physics/config.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

#define GZ_PHYSICS_VERSION "${PROJECT_VERSION}"
#define GZ_PHYSICS_VERSION_FULL "${PROJECT_VERSION_FULL}"
#define GZ_PHYSICS_VERSION_NAMESPACE v${PROJECT_VERSION_MAJOR}

#define GZ_PHYSICS_ENGINE_INSTALL_DIR _Pragma ("GCC warning \"'GZ_PHYSICS_ENGINE_INSTALL_DIR' macro is deprecated, use gz::physics::getEngineInstallDir() function instead. \"") "${GZ_PHYSICS_ENGINE_INSTALL_DIR}"

Expand Down
24 changes: 9 additions & 15 deletions src/InstallationDirectories.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,27 @@ namespace gz
{
namespace physics
{
namespace {
inline namespace GZ_PHYSICS_VERSION_NAMESPACE {

// We locally import the gz::common::joinPaths function
// See https://github.com/gazebosim/gz-physics/pull/507#discussion_r1186919267
// for more details

// Function imported from
// https://github.com/gazebosim/gz-common/blob/ignition-common4_4.6.2/src/FilesystemBoost.cc#L507
#ifndef _WIN32
const char preferred_separator = '/';
#ifndef WIN32
static const char preferred_separator = '/';
#else // Windows
static const char preferred_separator = '\\';
#endif
std::string separator(const std::string &_p)
const std::string separator(const std::string &_p)
{
return _p + preferred_separator;
}

#ifdef _WIN32
// Function imported from
// https://github.com/gazebosim/gz-common/blob/ignition-common4_4.6.2/src/Filesystem.cc#L227
std::string checkWindowsPath(const std::string &_path)
std::string checkWindowsPath(const std::string _path)
{
if (_path.empty())
return _path;
Expand All @@ -76,7 +75,6 @@ std::string checkWindowsPath(const std::string &_path)
result, std::regex("[<>:\"|?*]"), "");
return result;
}
#endif

// Function imported from
// https://github.com/gazebosim/gz-common/blob/ignition-common4_4.6.2/src/Filesystem.cc#L256
Expand Down Expand Up @@ -144,18 +142,14 @@ std::string joinPaths(const std::string &_path1,
#endif // _WIN32
return path;
}
} // namespace

inline namespace GZ_PHYSICS_VERSION_NAMESPACE {
#ifdef GZ_PHYSICS_BAZEL_BUILD
std::string getInstallPrefix() { return "physics"; }
#endif

std::string getEngineInstallDir()
{
return gz::physics::joinPaths(
getInstallPrefix(), GZ_PHYSICS_ENGINE_RELATIVE_INSTALL_DIR);
}
} // namespace GZ_PHYSICS_VERSION_NAMESPACE
} // namespace physics
} // namespace gz

}
}
}
Loading

0 comments on commit ea90ada

Please sign in to comment.