Skip to content

Commit

Permalink
cmake: fix tests' linking with libraries outside of a default path
Browse files Browse the repository at this point in the history
Just use a similar approach as server/CMakeLists.txt is already doing
rather than a hardcoded list of libraries.
  • Loading branch information
jktjkt committed Jul 26, 2016
1 parent f055519 commit 376c460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endforeach()

foreach(test_name IN LISTS tests)
add_executable(${test_name} ${test_name}.c ../netconf_monitoring.c ../operations.c ../op_get_config.c ../op_editconfig.c ../op_copyconfig.c ../op_deleteconfig.c ../op_candidate.c ../op_validate.c ../op_un_lock.c ../op_generic.c ../log.c)
target_link_libraries(${test_name} ${CMOCKA_LIBRARIES} pthread yang netconf2 sysrepo)
target_link_libraries(${test_name} ${CMOCKA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${LIBYANG_LIBRARIES} ${LIBNETCONF2_LIBRARIES} ${SYSREPO_LIBRARIES})
set_target_properties(${test_name} PROPERTIES LINK_FLAGS "${${test_name}_wrap_link_flags}")
add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
endforeach(test_name)
Expand Down

0 comments on commit 376c460

Please sign in to comment.