Automated g4 rollback of changelist 489207765.
*** Reason for rollback *** Corrected logic in CMake *** Original change description *** Automated g4 rollback of changelist 489183597. *** Reason for rollback *** GitHub path is different *** Original change description *** Activate plugin tests on Windows. *** *** PiperOrigin-RevId: 489228199 Change-Id: Ic0ee9114e9680fc0aef9f668fc172c73fe74cd38
This commit is contained in:
committed by
Copybara-Service
parent
17c82e2f02
commit
043ed273a7
@@ -12,6 +12,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
mujoco_test(elasticity_test)
|
||||
target_link_libraries(elasticity_test fixture gmock elasticity)
|
||||
|
||||
mujoco_test(
|
||||
elasticity_test
|
||||
PROPERTIES
|
||||
ENVIRONMENT
|
||||
"MUJOCO_PLUGIN_DIR=$<TARGET_FILE_DIR:elasticity>"
|
||||
)
|
||||
target_link_libraries(elasticity_test fixture gmock)
|
||||
|
||||
@@ -27,8 +27,28 @@
|
||||
|
||||
namespace mujoco {
|
||||
namespace {
|
||||
using PluginTest = MujocoTest;
|
||||
|
||||
class PluginTest : public MujocoTest {
|
||||
public:
|
||||
// load plugin library
|
||||
PluginTest() : MujocoTest() {
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
mj_loadPluginLibrary((
|
||||
std::string(std::getenv("MUJOCO_PLUGIN_DIR")) +
|
||||
std::string("\\elasticity.dll")).c_str());
|
||||
#else
|
||||
#if defined(__APPLE__)
|
||||
mj_loadPluginLibrary((
|
||||
std::string(std::getenv("MUJOCO_PLUGIN_DIR")) +
|
||||
std::string("/libelasticity.dylib")).c_str());
|
||||
#else
|
||||
mj_loadPluginLibrary((
|
||||
std::string(std::getenv("MUJOCO_PLUGIN_DIR")) +
|
||||
std::string("/libelasticity.so")).c_str());
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
// -------------------------------- cable -----------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user