Skip to content

Commit 7d83afa

Browse files
lmonetaetejedor
authored andcommitted
Fix linking of Python libraries on Apple for the executables emitFromKeras and emitFromPyTorch
1 parent 8fbd18f commit 7d83afa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tmva/pymva/test/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ if(PY_TORCH_FOUND)
5050
${CMAKE_SOURCE_DIR}/tmva/sofie/src/SOFIE_common.cxx
5151
)
5252
target_link_libraries(emitFromPyTorch ${PYTHON_LIBRARIES} ${Libraries})
53+
if(APPLE)
54+
target_link_options(emitFromPyTorch PRIVATE ${PYTHON_LINK_OPTIONS_Development_Main})
55+
endif()
56+
5357
target_include_directories(emitFromPyTorch PRIVATE
5458
${CMAKE_SOURCE_DIR}/tmva/sofie/inc
5559
${CMAKE_SOURCE_DIR}/tmva/inc
@@ -108,6 +112,10 @@ if((PY_KERAS_FOUND AND PY_THEANO_FOUND) OR (PY_KERAS_FOUND AND PY_TENSORFLOW_FOU
108112
${CMAKE_SOURCE_DIR}/tmva/sofie/src/SOFIE_common.cxx
109113
)
110114
target_link_libraries(emitFromKeras ${PYTHON_LIBRARIES} ${Libraries})
115+
if(APPLE)
116+
target_link_options(emitFromKeras PRIVATE ${PYTHON_LINK_OPTIONS_Development_Main})
117+
endif()
118+
111119
target_include_directories(emitFromKeras PRIVATE
112120
${CMAKE_SOURCE_DIR}/tmva/sofie/inc
113121
${CMAKE_SOURCE_DIR}/tmva/inc

0 commit comments

Comments
 (0)