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

Revert "Bazel updates for garden" #596

Merged
merged 1 commit into from
Feb 6, 2024
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
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
Loading