From: Thomas Jarosch Date: Fri, 8 Sep 2017 12:15:34 +0000 (+0200) Subject: Explicitly link pthread X-Git-Url: http://developer.intra2net.com/git/?p=pingcheck;a=commitdiff_plain;h=ed146945e94bedf363d4caf6e541927e792a39db Explicitly link pthread Needed by newer binutils, they are more strict. --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d0bd59c..268d58f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -128,6 +128,7 @@ target_link_libraries( ${TARGET} ${Boost_LIBRARIES} ${I2NCOMMON_LIBRARIES} + pthread ) # creates the install rule for the binary @@ -136,6 +137,7 @@ install(TARGETS ${TARGET} DESTINATION bin) # create a library from the same files to feed into the linker for tools add_library(lib_for_tools STATIC ${SOURCES}) +target_link_libraries(lib_for_tools pthread) # now create an executable for tools/feed_packet_data that depends on lib_for_tools set(feed_packet_data_SOURCES tools/pcap.cpp tools/feed_packet_data.cpp) diff --git a/test/CMakeLists.test_configurationcommandline.txt b/test/CMakeLists.test_configurationcommandline.txt index b8788eb..a6508b7 100644 --- a/test/CMakeLists.test_configurationcommandline.txt +++ b/test/CMakeLists.test_configurationcommandline.txt @@ -43,6 +43,7 @@ target_link_libraries( test_configurationcommandline ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_configurationfile.txt b/test/CMakeLists.test_configurationfile.txt index 522a18b..0dad829 100644 --- a/test/CMakeLists.test_configurationfile.txt +++ b/test/CMakeLists.test_configurationfile.txt @@ -43,6 +43,7 @@ target_link_libraries( test_configurationfile ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_configurationoptions.txt b/test/CMakeLists.test_configurationoptions.txt index f2fea82..faa41b5 100644 --- a/test/CMakeLists.test_configurationoptions.txt +++ b/test/CMakeLists.test_configurationoptions.txt @@ -41,6 +41,7 @@ target_link_libraries( test_configurationoptions ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_dns.txt b/test/CMakeLists.test_dns.txt index 71ef23d..5620a6a 100644 --- a/test/CMakeLists.test_dns.txt +++ b/test/CMakeLists.test_dns.txt @@ -31,6 +31,7 @@ target_link_libraries( test_dns ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_hoststatus.txt b/test/CMakeLists.test_hoststatus.txt index bf1bc29..e60c237 100644 --- a/test/CMakeLists.test_hoststatus.txt +++ b/test/CMakeLists.test_hoststatus.txt @@ -11,6 +11,7 @@ target_link_libraries( test_hoststatus ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_icmppacket.txt b/test/CMakeLists.test_icmppacket.txt index e2b2ffd..19a2471 100644 --- a/test/CMakeLists.test_icmppacket.txt +++ b/test/CMakeLists.test_icmppacket.txt @@ -33,6 +33,7 @@ target_link_libraries( test_icmppacket ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_icmpv4header.txt b/test/CMakeLists.test_icmpv4header.txt index 9ac5c9f..59b3e83 100644 --- a/test/CMakeLists.test_icmpv4header.txt +++ b/test/CMakeLists.test_icmpv4header.txt @@ -18,6 +18,7 @@ target_link_libraries( test_icmpv4header ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_icmpv6header.txt b/test/CMakeLists.test_icmpv6header.txt index 5a5a787..fe5266a 100644 --- a/test/CMakeLists.test_icmpv6header.txt +++ b/test/CMakeLists.test_icmpv6header.txt @@ -18,6 +18,7 @@ target_link_libraries( test_icmpv6header ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_ipv4header.txt b/test/CMakeLists.test_ipv4header.txt index 7ac405f..af8ec8d 100644 --- a/test/CMakeLists.test_ipv4header.txt +++ b/test/CMakeLists.test_ipv4header.txt @@ -12,6 +12,7 @@ target_link_libraries( test_ipv4header ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_ipv6header.txt b/test/CMakeLists.test_ipv6header.txt index e197f21..bae2ab9 100644 --- a/test/CMakeLists.test_ipv6header.txt +++ b/test/CMakeLists.test_ipv6header.txt @@ -12,6 +12,7 @@ target_link_libraries( test_ipv6header ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_linkstatus.txt b/test/CMakeLists.test_linkstatus.txt index 35269f9..ad3b987 100644 --- a/test/CMakeLists.test_linkstatus.txt +++ b/test/CMakeLists.test_linkstatus.txt @@ -19,6 +19,7 @@ target_link_libraries( test_linkstatus ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_loglevel.txt b/test/CMakeLists.test_loglevel.txt index 236a9bd..12a9e15 100644 --- a/test/CMakeLists.test_loglevel.txt +++ b/test/CMakeLists.test_loglevel.txt @@ -10,6 +10,7 @@ target_link_libraries( test_loglevel ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_logoutput.txt b/test/CMakeLists.test_logoutput.txt index ef7ea3f..b8cf2b6 100644 --- a/test/CMakeLists.test_logoutput.txt +++ b/test/CMakeLists.test_logoutput.txt @@ -10,6 +10,7 @@ target_link_libraries( test_logoutput ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_messagepayload.txt b/test/CMakeLists.test_messagepayload.txt index 99ff27e..07cc163 100644 --- a/test/CMakeLists.test_messagepayload.txt +++ b/test/CMakeLists.test_messagepayload.txt @@ -10,6 +10,7 @@ target_link_libraries( test_messagepayload ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_pingprotocol.txt b/test/CMakeLists.test_pingprotocol.txt index e65c6dc..24cef29 100644 --- a/test/CMakeLists.test_pingprotocol.txt +++ b/test/CMakeLists.test_pingprotocol.txt @@ -10,6 +10,7 @@ target_link_libraries( test_pingprotocol ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test" diff --git a/test/CMakeLists.test_tcpheader.txt b/test/CMakeLists.test_tcpheader.txt index 3f69afe..8a41528 100644 --- a/test/CMakeLists.test_tcpheader.txt +++ b/test/CMakeLists.test_tcpheader.txt @@ -11,6 +11,7 @@ target_link_libraries( test_tcpheader ${I2NCOMMON_LIBRARIES} ${Boost_LIBRARIES} + pthread ) # cmake: invocation via "make test"