Skip to content

Commit

Permalink
Possibly fix link issue with libpython
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Jan 28, 2025
1 parent 3ceeec0 commit dce10e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,8 @@ set(NRN_RUN_FROM_BUILD_DIR_ENV "NEURONHOME=${PROJECT_BINARY_DIR}/share/nrn"
# if we do not link against Python, NMODL will complain that some of the env variables are missing
# when building coreNEURON mod files
if(NOT NRN_LINK_AGAINST_PYTHON)
list(GET NRN_PYTHON_LIBRARIES 0 PYTHONLIB)
set(NRN_RUN_FROM_BUILD_DIR_ENV "${NRN_RUN_FROM_BUILD_DIR_ENV}" "NMODLHOME=${PROJECT_BINARY_DIR}"
"NMODL_PYLIB=${PYTHONLIB}")
"NMODL_PYLIB=${PYTHON_LIBRARY}")
endif()
prepend_to_var(PATH "${PROJECT_BINARY_DIR}/bin")
if(APPLE)
Expand Down
2 changes: 1 addition & 1 deletion test/nmodl/transpiler/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ endforeach()

foreach(test_name testcodegen testvisitor)
if(NOT NRN_LINK_AGAINST_PYTHON)
target_link_libraries(${test_name} PRIVATE pywrapper ${PYTHONLIB})
target_link_libraries(${test_name} PRIVATE pywrapper ${PYTHON_LIBRARY})
endif()
cpp_cc_configure_sanitizers(TARGET ${test_name})
set(env ${test_env})
Expand Down
4 changes: 2 additions & 2 deletions test/nmodl/transpiler/usecases/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ foreach(usecase ${NMODL_USECASE_DIRS})
COMMAND
${CMAKE_COMMAND} -E env "PATH=${CMAKE_BINARY_DIR}/bin:$ENV{PATH}"
"NRNHOME=${CMAKE_BINARY_DIR}" "NEURONHOME=${CMAKE_BINARY_DIR}/share/nrn"
"CORENRNHOME=${CMAKE_BINARY_DIR}" "NMODL_PYLIB=${PYTHONLIB}" "NMODLHOME=${CMAKE_BINARY_DIR}"
"PYTHONPATH=${CMAKE_BINARY_DIR}/lib/python:$ENV{PYTHONPATH}"
"CORENRNHOME=${CMAKE_BINARY_DIR}" "NMODL_PYLIB=${PYTHON_LIBRARY}"
"NMODLHOME=${CMAKE_BINARY_DIR}" "PYTHONPATH=${CMAKE_BINARY_DIR}/lib/python:$ENV{PYTHONPATH}"
${CMAKE_CURRENT_SOURCE_DIR}/run_test.sh ${CMAKE_BINARY_DIR}/bin/nmodl
${CMAKE_CURRENT_SOURCE_DIR}/${usecase})
endforeach()

0 comments on commit dce10e9

Please sign in to comment.