Skip to content

Commit a4ef2f1

Browse files
committed
cmake: update nrniv_lib linking for SUNDIALS v3 submodule
- Use keyword signatures consistently in target_link_libraries - Make SUNDIALS include directory PRIVATE + BUILD_INTERFACE only
1 parent 7a1f69c commit a4ef2f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/nrniv/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,9 @@ endif()
455455
find_package(SUNDIALS REQUIRED)
456456
add_dependencies(nrniv_lib SUNDIALS)
457457
target_link_libraries(
458-
nrniv_lib ${SUNDIALS_LIB_DIR}/libsundials_ida.a ${SUNDIALS_LIB_DIR}/libsundials_cvode.a
458+
nrniv_lib PRIVATE ${SUNDIALS_LIB_DIR}/libsundials_ida.a ${SUNDIALS_LIB_DIR}/libsundials_cvode.a
459459
${SUNDIALS_LIB_DIR}/libsundials_nvecpthreads.a ${SUNDIALS_LIB_DIR}/libsundials_nvecserial.a)
460-
target_include_directories(nrniv_lib PUBLIC ${SUNDIALS_INCLUDE_DIR})
460+
target_include_directories(nrniv_lib PRIVATE $<BUILD_INTERFACE:${SUNDIALS_INCLUDE_DIR}>)
461461

462462
set_target_properties(nrniv_lib PROPERTIES EXPORT_NAME nrniv OUTPUT_NAME nrniv)
463463
target_compile_features(nrniv_lib PUBLIC cxx_std_17)

0 commit comments

Comments
 (0)