Verified Commit 56f4edd6 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

test/cmake: set the MODEL_DIR to all tests

parent 000ef447
#
# Copyright (c) 2015-2019 CNRS INRIA
# Copyright (c) 2015-2020 CNRS INRIA
# Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
#
......@@ -23,6 +23,7 @@ MACRO(ADD_PINOCCHIO_UNIT_TEST NAME)
SET(MODULE_NAME "${NAME}Test")
STRING(REGEX REPLACE "-" "_" MODULE_NAME ${MODULE_NAME})
ADD_TEST_CFLAGS(${NAME} "-DBOOST_TEST_MODULE=${MODULE_NAME}")
ADD_TEST_CFLAGS(${NAME} '-DPINOCCHIO_MODEL_DIR=\\\"${PINOCCHIO_MODEL_DIR}\\\"')
PKG_CONFIG_USE_DEPENDENCY(${TEST_NAME} eigen3)
FOREACH(PKG ${PKGS})
......@@ -64,26 +65,20 @@ ADD_PINOCCHIO_UNIT_TEST(kinematics)
IF(URDFDOM_FOUND)
ADD_PINOCCHIO_UNIT_TEST(urdf urdfdom)
ADD_TEST_CFLAGS(urdf '-DPINOCCHIO_MODEL_DIR=\\\"${PINOCCHIO_MODEL_DIR}\\\"')
ADD_PINOCCHIO_UNIT_TEST(value urdfdom)
ADD_TEST_CFLAGS(value '-DPINOCCHIO_MODEL_DIR=\\\"${PINOCCHIO_MODEL_DIR}\\\"')
IF(HPP_FCL_FOUND)
ADD_PINOCCHIO_UNIT_TEST(geom urdfdom)
ADD_TEST_CFLAGS(geom '-DPINOCCHIO_MODEL_DIR=\\\"${PINOCCHIO_MODEL_DIR}\\\"')
ADD_PINOCCHIO_UNIT_TEST(srdf urdfdom)
ADD_TEST_CFLAGS(srdf '-DPINOCCHIO_MODEL_DIR=\\\"${PINOCCHIO_MODEL_DIR}\\\"')
ENDIF(HPP_FCL_FOUND)
ENDIF(URDFDOM_FOUND)
IF(LUA5_FOUND)
ADD_PINOCCHIO_UNIT_TEST(lua ${LUA5_PACKAGE})
ADD_TEST_CFLAGS(lua '-DPINOCCHIO_MODEL_DIR=\\\"${PINOCCHIO_MODEL_DIR}\\\"')
ENDIF(LUA5_FOUND)
IF(BUILD_PYTHON_INTERFACE)
ADD_PINOCCHIO_UNIT_TEST(python_parser eigenpy)
ADD_TEST_CFLAGS(python_parser '-DPINOCCHIO_MODEL_DIR=\\\"${PINOCCHIO_MODEL_DIR}\\\"')
TARGET_LINK_LIBRARIES(test-python_parser ${PYWRAP})
TARGET_LINK_LIBRARIES(test-python_parser ${PYTHON_LIBRARIES})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment