Verified Commit 43f860f7 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: fix path

parent 8f32b5e8
......@@ -43,7 +43,6 @@ jobs:
set PATH=%PATH:C:\hostedtoolcache\windows\Boost\1.72.0;=%
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
type C:\Miniconda\envs\pinocchio\Library\include\urdf_sensor\sensor.h
:: start building
mkdir build
......@@ -59,4 +58,7 @@ jobs:
-DBUILD_WITH_URDF_SUPPORT=ON -DBUILD_PYTHON_INTERFACE=ON ^
..
cmake --build . --config Release --target install
cd unittest\Release
test-cpp-urdf
cd ..\..
ctest --output-on-failure -C Release
......@@ -28,6 +28,9 @@ FUNCTION(REMOVE_PATH_FROM_LIST list_name path_name dest_list)
ENDFUNCTION(REMOVE_PATH_FROM_LIST)
# --- PYTHON TARGET --- #
SET(PYWRAP ${PROJECT_NAME}_pywrap)
SET(PYWRAP ${PYWRAP} PARENT_SCOPE)
FILE(GLOB_RECURSE ${PROJECT_NAME}_PYTHON_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
)
......@@ -91,9 +94,6 @@ IF(BUILD_PYTHON_INTERFACE)
ADD_CUSTOM_TARGET(python)
SET_TARGET_PROPERTIES(python PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True)
SET(PYWRAP ${PROJECT_NAME}_pywrap)
SET(PYWRAP ${PYWRAP} PARENT_SCOPE)
SET(PKG_CONFIG_PYWRAP_REQUIRES "eigenpy >= 2.2.0")
ADD_LIBRARY(${PYWRAP} SHARED ${${PYWRAP}_SOURCES} ${${PYWRAP}_HEADERS})
ADD_DEPENDENCIES(python ${PYWRAP})
......@@ -119,11 +119,11 @@ IF(BUILD_PYTHON_INTERFACE)
ENDIF(BUILD_WITH_HPP_FCL_PYTHON_BINDINGS)
IF(WIN32)
TARGET_COMPILE_DEFINITIONS(${PYWRAP} PRIVATE -DNOMINMAX)
# TARGET_LINK_LIBRARIES(${PYWRAP} PUBLIC ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(${PYWRAP} PUBLIC ${PYTHON_LIBRARY})
ENDIF(WIN32)
IF(PINOCCHIO_SITELIB_ROOT)
SET({PYWRAP}_INSTALL_DIR ${PINOCCHIO_SITELIB_ROOT}/${PYTHON_SITELIB}/${PROJECT_NAME})
SET(${PYWRAP}_INSTALL_DIR ${PINOCCHIO_SITELIB_ROOT}/${PYTHON_SITELIB}/${PROJECT_NAME})
ELSE()
SET(${PYWRAP}_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/${PROJECT_NAME})
ENDIF()
......
......@@ -28,10 +28,6 @@ MACRO(ADD_PINOCCHIO_UNIT_TEST NAME)
ADD_TEST_CFLAGS(${NAME} "-DNOMINMAX -D_USE_MATH_DEFINES")
ENDIF(WIN32)
FOREACH(PKG ${PKGS})
TARGET_LINK_LIBRARIES(${TEST_NAME} PUBLIC ${PKG}::${PKG})
ENDFOREACH(PKG)
TARGET_LINK_LIBRARIES(${TEST_NAME} PUBLIC ${PROJECT_NAME})
TARGET_LINK_LIBRARIES(${TEST_NAME} PRIVATE ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
ENDMACRO(ADD_PINOCCHIO_UNIT_TEST)
......@@ -63,15 +59,15 @@ ADD_PINOCCHIO_UNIT_TEST(contact-dynamics)
ADD_PINOCCHIO_UNIT_TEST(sample-models)
ADD_PINOCCHIO_UNIT_TEST(kinematics)
IF(URDFDOM_FOUND)
ADD_PINOCCHIO_UNIT_TEST(urdf urdfdom)
IF(urdfdom_FOUND)
ADD_PINOCCHIO_UNIT_TEST(urdf)
ADD_PINOCCHIO_UNIT_TEST(value urdfdom)
ADD_PINOCCHIO_UNIT_TEST(value)
IF(HPP_FCL_FOUND)
ADD_PINOCCHIO_UNIT_TEST(geom urdfdom)
ADD_PINOCCHIO_UNIT_TEST(srdf urdfdom)
ADD_PINOCCHIO_UNIT_TEST(geom)
ADD_PINOCCHIO_UNIT_TEST(srdf)
ENDIF(HPP_FCL_FOUND)
ENDIF(URDFDOM_FOUND)
ENDIF(urdfdom_FOUND)
IF(BUILD_PYTHON_INTERFACE)
ADD_PINOCCHIO_UNIT_TEST(python_parser eigenpy)
......@@ -138,14 +134,12 @@ ENDIF(BUILD_ADVANCED_TESTING)
MACRO(ADD_CPPAD_UNIT_TEST name)
ADD_PINOCCHIO_UNIT_TEST(${name} cppad)
ADD_DEPENDENCIES(test-cppad test-cpp-${name})
TARGET_LINK_LIBRARIES(test-cpp-${name} PUBLIC cppad::cppad)
ENDMACRO()
MACRO(ADD_CPPADCG_UNIT_TEST name)
ADD_PINOCCHIO_UNIT_TEST(${name} cppadcg)
SET_PROPERTY(TARGET test-cpp-${name} PROPERTY CXX_STANDARD 11)
ADD_DEPENDENCIES(test-cppadcg test-cpp-${name})
TARGET_LINK_LIBRARIES(test-cpp-${name} PUBLIC ${CMAKE_DL_LIBS} cppadcg::cppadcg)
ENDMACRO()
IF(BUILD_WITH_AUTODIFF_SUPPORT)
......@@ -173,6 +167,7 @@ ENDIF(BUILD_WITH_AUTODIFF_SUPPORT)
MACRO(ADD_CASADI_UNIT_TEST name)
ADD_PINOCCHIO_UNIT_TEST(${name} casadi)
SET_PROPERTY(TARGET test-cpp-${name} PROPERTY CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(test-cpp-${name} PUBLIC casadi)
ADD_DEPENDENCIES(test-casadi test-cpp-${name})
ENDMACRO()
......
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