Verified Commit eec9848e authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake/test: fix prefix

parent 1f6055e0
......@@ -19,10 +19,10 @@ MACRO(ADD_PINOCCHIO_UNIT_TEST NAME)
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES LINKER_LANGUAGE CXX)
TARGET_INCLUDE_DIRECTORIES(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
ADD_TEST_CFLAGS(${TEST_NAME} "-DBOOST_TEST_DYN_LINK")
ADD_TEST_CFLAGS(${NAME} "-DBOOST_TEST_DYN_LINK")
SET(MODULE_NAME "${NAME}Test")
STRING(REGEX REPLACE "-" "_" MODULE_NAME ${MODULE_NAME})
ADD_TEST_CFLAGS(${TEST_NAME} "-DBOOST_TEST_MODULE=${MODULE_NAME}")
ADD_TEST_CFLAGS(${NAME} "-DBOOST_TEST_MODULE=${MODULE_NAME}")
PKG_CONFIG_USE_DEPENDENCY(${TEST_NAME} eigen3)
FOREACH(PKG ${PKGS})
......@@ -64,7 +64,7 @@ ADD_PINOCCHIO_UNIT_TEST(kinematics)
IF(URDFDOM_FOUND)
ADD_PINOCCHIO_UNIT_TEST(urdf urdfdom)
ADD_TEST_CFLAGS(test-urdf '-DPINOCCHIO_MODEL_DIR=\\\"${PINOCCHIO_MODEL_DIR}\\\"')
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}\\\"')
......@@ -85,14 +85,14 @@ 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(python_parser ${PYWRAP})
TARGET_LINK_LIBRARIES(python_parser ${PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(test-python_parser ${PYWRAP})
TARGET_LINK_LIBRARIES(test-python_parser ${PYTHON_LIBRARIES})
SET(ENV_VARIABLES "PYTHONPATH=${CMAKE_BINARY_DIR}/bindings/python:$ENV{PYTHONPATH}")
IF(APPLE)
LIST(APPEND ENV_VARIABLES "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}")
LIST(APPEND ENV_VARIABLES "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}")
ENDIF(APPLE)
SET_PROPERTY(TEST python_parser PROPERTY ENVIRONMENT ${ENV_VARIABLES})
SET_PROPERTY(TEST test-python_parser PROPERTY ENVIRONMENT ${ENV_VARIABLES})
ADD_SUBDIRECTORY(python)
ENDIF(BUILD_PYTHON_INTERFACE)
......
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