Skip to content

Commit

Permalink
Add more prints for python libs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Mar 28, 2024
1 parent b826be0 commit 2875515
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/PythonGetLibAndLinkUp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ if(WIN32)
endif()

# then copy the DLL in
message("COPYING ${RESOLVED_PYTHON_LIB} to ${BASE_PATH}")
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${RESOLVED_PYTHON_LIB}" "${BASE_PATH}")
4 changes: 4 additions & 0 deletions src/EnergyPlus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,8 @@ endif()
if(LINK_WITH_PYTHON)
# link the executable to the dll and bring it in
get_filename_component(RESOLVED_PYTHON_LIBRARY "${Python_LIBRARIES}" REALPATH)
message("Python_LIBRARIES=${Python_LIBRARIES}")
message("RESOLVED_PYTHON_LIBRARY=${RESOLVED_PYTHON_LIBRARY}")
if(WIN32)

# In case you have both release and debug Python libraries on your system, Python_LIBRARIES might be "optimized;C:/.../python38.lib;debug;C:/.../python38_d.lib"
Expand All @@ -931,6 +933,7 @@ if(LINK_WITH_PYTHON)
endforeach()
# else()
# No-op, already done above
message("RESOLVED_PYTHON_LIBRARY (optimized) =${RESOLVED_PYTHON_LIBRARY}")
endif()

# Windows is being ugly and linking against the Python DLL but not running
Expand All @@ -941,6 +944,7 @@ if(LINK_WITH_PYTHON)
COMMAND ${CMAKE_COMMAND} -DRESOLVED_PYTHON_LIB=${RESOLVED_PYTHON_LIBRARY} -DEXECUTABLE_PATH=$<TARGET_FILE:energyplusapi> -P
${PROJECT_SOURCE_DIR}/cmake/PythonGetLibAndLinkUp.cmake)
endif()

install(
CODE "execute_process(
COMMAND ${CMAKE_COMMAND}
Expand Down

0 comments on commit 2875515

Please sign in to comment.