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

cmake: add LINK_PYTHON_INTERFACE_TO_OPENM

parent 48a4d95a
Pipeline #13921 passed with stage
in 169 minutes and 37 seconds
......@@ -66,6 +66,7 @@ OPTION(BUILD_WITH_AUTODIFF_SUPPORT "Build the library with the automatic differe
OPTION(BUILD_WITH_CASADI_SUPPORT "Build the library with the support of CASADI" OFF)
OPTION(BUILD_WITH_CODEGEN_SUPPORT "Build the library with the support of code generation (via CppADCodeGen)" OFF)
OPTION(BUILD_WITH_OPENMP_SUPPORT "Build the library with the OpenMP support" OFF)
cmake_dependent_option(LINK_PYTHON_INTERFACE_TO_OPENM "Link OpenMP to the Python interface" ON BUILD_WITH_OPENMP_SUPPORT OFF)
OPTION(INITIALIZE_WITH_NAN "Initialize Eigen entries with NaN" OFF)
......
......@@ -131,7 +131,9 @@ IF(BUILD_PYTHON_INTERFACE)
TARGET_COMPILE_OPTIONS(${PYWRAP} PRIVATE ${OpenMP_COMPILE_OPTIONS})
TARGET_COMPILE_DEFINITIONS(${PYWRAP} PRIVATE -DPINOCCHIO_PYTHON_INTERFACE_WITH_OPENMP)
TARGET_INCLUDE_DIRECTORIES(${PYWRAP} SYSTEM PRIVATE ${OpenMP_INCLUDE_DIR})
#TARGET_LINK_LIBRARIES(${PYWRAP} PRIVATE -Wl,-undefined,dynamic_lookup,${OpenMP_LIBRARIES})
IF(LINK_PYTHON_INTERFACE_TO_OPENM)
TARGET_LINK_LIBRARIES(${PYWRAP} PRIVATE ${OpenMP_LIBRARIES})
ENDIF(LINK_PYTHON_INTERFACE_TO_OPENM)
ENDIF(BUILD_WITH_OPENMP_SUPPORT)
ADD_DEPENDENCIES(python ${PYWRAP})
......
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