Verified Commit 02df005c authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: fix linkage issue to OpenMP

parent d617fc32
......@@ -25,10 +25,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(${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(${NAME} "-DBOOST_TEST_MODULE=${MODULE_NAME}")
ADD_TEST_CFLAGS(${NAME} "-DBOOST_TEST_MODULE=${MODULE_NAME}")
ADD_TEST_CFLAGS(${NAME} "-DPINOCCHIO_MODEL_DIR=\\\\\"${PINOCCHIO_MODEL_DIR}\\\\\"")
IF(WIN32)
ADD_TEST_CFLAGS(${NAME} "-DNOMINMAX -D_USE_MATH_DEFINES")
......@@ -99,6 +99,10 @@ IF(BUILD_PYTHON_INTERFACE AND NOT BUILD_PYTHON_INTERFACE_WITH_PYPY)
ADD_PINOCCHIO_UNIT_TEST(python_parser PACKAGES eigenpy)
TARGET_INCLUDE_DIRECTORIES(test-cpp-python_parser SYSTEM PUBLIC ${PYTHON_INCLUDE_DIRS})
IF(BUILD_WITH_OPENMP_SUPPORT AND NOT LINK_PYTHON_INTERFACE_TO_OPENMP)
TARGET_LINK_LIBRARIES(test-cpp-python_parser PRIVATE OpenMP::OpenMP_CXX)
ENDIF()
TARGET_LINK_LIBRARIES(test-cpp-python_parser PUBLIC ${PYWRAP})
TARGET_LINK_LIBRARIES(test-cpp-python_parser PUBLIC ${PYTHON_LIBRARIES})
SET(ENV_VARIABLES "PYTHONPATH=${CMAKE_BINARY_DIR}/bindings/python:$ENV{PYTHONPATH}")
......
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