Skip to content

Commit

Permalink
Make it possible to compile oxpy with -DDebug=True
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo-rovigatti committed Sep 7, 2022
1 parent 3a2f0ae commit 7a0c5b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oxpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ IF(Python)
SET(CMAKE_SHARED_LIBRARY_PREFIX "")

# we need the oxDNA "common" library to be compiled so that the resulting code is position-independent and the library can be linked dynamically
SET_TARGET_PROPERTIES(oxdna_common PROPERTIES POSITION_INDEPENDENT_CODE ON)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES POSITION_INDEPENDENT_CODE ON)

ADD_LIBRARY(_oxpy_lib STATIC ${oxpy_SOURCES})
TARGET_LINK_LIBRARIES(_oxpy_lib ${PYTHON_LIBRARIES} oxdna_common)
TARGET_LINK_LIBRARIES(_oxpy_lib ${PYTHON_LIBRARIES} ${lib_name})
SET_TARGET_PROPERTIES(_oxpy_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)
pybind11_add_module(core SHARED bindings.cpp)
TARGET_LINK_LIBRARIES(core PRIVATE _oxpy_lib)
Expand Down

0 comments on commit 7a0c5b8

Please sign in to comment.