Commit 3e8d8304 authored by Justin Carpentier's avatar Justin Carpentier

test: add test as suffix

parent deec457c
......@@ -14,7 +14,7 @@ ENDMACRO(ADD_TEST_CFLAGS)
MACRO(ADD_PINOCCHIO_UNIT_TEST NAME)
SET(PKGS ${ARGN}) # Optional arguments
SET(TEST_NAME "test-${NAME}")
SET(TEST_NAME "${NAME}-test")
ADD_UNIT_TEST(${TEST_NAME} ${NAME}.cpp)
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES LINKER_LANGUAGE CXX)
TARGET_INCLUDE_DIRECTORIES(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -63,35 +63,35 @@ ADD_PINOCCHIO_UNIT_TEST(kinematics)
IF(URDFDOM_FOUND)
ADD_PINOCCHIO_UNIT_TEST(urdf urdfdom)
ADD_TEST_CFLAGS(test-urdf '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ADD_TEST_CFLAGS(urdf-test '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ADD_PINOCCHIO_UNIT_TEST(value urdfdom)
ADD_TEST_CFLAGS(test-value '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ADD_TEST_CFLAGS(value-test '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
IF(HPP_FCL_FOUND)
ADD_PINOCCHIO_UNIT_TEST(geom urdfdom)
ADD_TEST_CFLAGS(test-geom '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ADD_TEST_CFLAGS(geom-test '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ADD_PINOCCHIO_UNIT_TEST(srdf urdfdom)
ADD_TEST_CFLAGS(test-srdf '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ADD_TEST_CFLAGS(srdf-test '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ENDIF(HPP_FCL_FOUND)
ENDIF(URDFDOM_FOUND)
IF(LUA5_FOUND)
ADD_PINOCCHIO_UNIT_TEST(lua ${LUA5_PACKAGE})
ADD_TEST_CFLAGS(lua '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ADD_TEST_CFLAGS(lua-test '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ENDIF(LUA5_FOUND)
IF(BUILD_PYTHON_INTERFACE)
ADD_PINOCCHIO_UNIT_TEST(python_parser eigenpy)
ADD_TEST_CFLAGS(test-python_parser '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
ADD_TEST_CFLAGS(python_parser-test '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
TARGET_LINK_LIBRARIES(test-python_parser ${PYWRAP})
TARGET_LINK_LIBRARIES(test-python_parser ${PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(python_parser-test ${PYWRAP})
TARGET_LINK_LIBRARIES(python_parser-test ${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 test-python_parser PROPERTY ENVIRONMENT ${ENV_VARIABLES})
SET_PROPERTY(TEST python_parser-test PROPERTY ENVIRONMENT ${ENV_VARIABLES})
ADD_SUBDIRECTORY(python)
ENDIF(BUILD_PYTHON_INTERFACE)
......@@ -116,7 +116,7 @@ ADD_PINOCCHIO_UNIT_TEST(version)
ADD_PINOCCHIO_UNIT_TEST(copy)
MAKE_DIRECTORY("${CMAKE_CURRENT_BINARY_DIR}/serialization-data")
ADD_PINOCCHIO_UNIT_TEST(serialization)
ADD_TEST_CFLAGS(test-serialization '-DTEST_SERIALIZATION_FOLDER=\\\"${CMAKE_CURRENT_BINARY_DIR}/serialization-data\\\"')
ADD_TEST_CFLAGS(serialization-test '-DTEST_SERIALIZATION_FOLDER=\\\"${CMAKE_CURRENT_BINARY_DIR}/serialization-data\\\"')
# Derivatives algo
ADD_PINOCCHIO_UNIT_TEST(kinematics-derivatives)
......@@ -136,25 +136,25 @@ IF(CPPAD_FOUND AND BUILD_WITH_AUTODIFF_SUPPORT)
IF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT)
ADD_PINOCCHIO_UNIT_TEST(cppadcg-basic cppadcg)
SET_PROPERTY(TARGET test-cppadcg-basic PROPERTY CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(test-cppadcg-basic ${CMAKE_DL_LIBS})
SET_PROPERTY(TARGET cppadcg-basic-test PROPERTY CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(cppadcg-basic-test ${CMAKE_DL_LIBS})
ADD_PINOCCHIO_UNIT_TEST(cppadcg-algo cppadcg)
SET_PROPERTY(TARGET test-cppadcg-algo PROPERTY CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(test-cppadcg-algo ${CMAKE_DL_LIBS})
SET_PROPERTY(TARGET cppadcg-algo-test PROPERTY CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(cppadcg-algo-test ${CMAKE_DL_LIBS})
ENDIF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT)
ENDIF(CPPAD_FOUND AND BUILD_WITH_AUTODIFF_SUPPORT)
IF(CASADI_FOUND AND BUILD_WITH_CASADI_SUPPORT)
ADD_PINOCCHIO_UNIT_TEST(casadi-basic casadi)
SET_PROPERTY(TARGET test-casadi-basic PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET casadi-basic-test PROPERTY CXX_STANDARD 11)
ADD_PINOCCHIO_UNIT_TEST(casadi-spatial casadi)
SET_PROPERTY(TARGET test-casadi-spatial PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET casadi-spatial-test PROPERTY CXX_STANDARD 11)
ADD_PINOCCHIO_UNIT_TEST(casadi-joints casadi)
SET_PROPERTY(TARGET test-casadi-joints PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET casadi-joints-test PROPERTY CXX_STANDARD 11)
ADD_PINOCCHIO_UNIT_TEST(casadi-algo casadi)
SET_PROPERTY(TARGET test-casadi-algo PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET casadi-algo-test PROPERTY CXX_STANDARD 11)
ADD_PINOCCHIO_UNIT_TEST(casadi-algo-derivatives casadi)
SET_PROPERTY(TARGET test-casadi-algo-derivatives PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET casadi-algo-derivatives-test PROPERTY CXX_STANDARD 11)
ENDIF(CASADI_FOUND AND BUILD_WITH_CASADI_SUPPORT)
Markdown is supported
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