Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove GNUReadline link dependency from PyNEST #323

Merged
merged 2 commits into from
Apr 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ add_executable( nest main.cpp ${nest_sources} )
add_library( nest_lib ${nest_sources} )

target_link_libraries( nest
nestutil nestkernel random sli_lib ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES} )
nestutil nestkernel random sli_lib sli_readline
${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES} )

target_link_libraries( nest_lib
nestutil nestkernel random sli_lib ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES} )
Expand Down
20 changes: 16 additions & 4 deletions sli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ set( sli_sources
functiondatum.cc functiondatum.h
genericdatum.h
get_mem.c
gnureadline.cc gnureadline.h
integerdatum.cc integerdatum.h
interpret.cc interpret.h
iostreamdatum.cc iostreamdatum.h
Expand Down Expand Up @@ -85,11 +84,19 @@ set( sli_sources
)

add_library( sli_lib ${sli_sources} )
target_link_libraries( sli_lib nestutil ${READLINE_LIBRARIES} )
target_link_libraries( sli_lib nestutil )

# Make a separate target for linking against readline, so that
# pynestkernel does not need to link against readline and make
# loading different readlines a problem for Python. See this
# pull request for more information:
# https://github.com/nest/nest-simulator/pull/323
add_library( sli_readline gnureadline.cc gnureadline.h )
target_link_libraries( sli_readline sli_lib nestutil ${READLINE_LIBRARIES} )

# add the executable
add_executable( sli puresli.cc )
target_link_libraries( sli sli_lib )
target_link_libraries( sli sli_lib sli_readline )

target_include_directories( sli PRIVATE
${PROJECT_SOURCE_DIR}/libnestutil
Expand All @@ -101,13 +108,18 @@ target_include_directories( sli_lib PRIVATE
${PROJECT_BINARY_DIR}/libnestutil
)

target_include_directories( sli_readline PRIVATE
${PROJECT_SOURCE_DIR}/libnestutil
${PROJECT_BINARY_DIR}/libnestutil
)

target_compile_definitions( sli_lib PRIVATE
-DPKGDATADIR=\"${PKGDATADIR}\"
-DPKGDOCDIR=\"${PKGDOCDIR}\"
-DPKGSOURCEDIR=\"${PROJECT_SOURCE_DIR}\"
)

install( TARGETS sli_lib sli
install( TARGETS sli_readline sli_lib sli
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
RUNTIME DESTINATION ${INSTALL_BIN_DIR}
Expand Down