forked from sdr/gr-osmosdr
link with pthreads only when using gcc
Fix from c98be5dd
for MSVC which does not require pthreads for boost threading library.
Under gcc -pthread adds support for multithreading with the pthreads library.
This commit is contained in:
parent
ea1fc34766
commit
0b5c3911f7
|
@ -43,7 +43,11 @@ GR_OSMOSDR_APPEND_SRCS(
|
||||||
time_spec.cc
|
time_spec.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND Boost_LIBRARIES pthread)
|
#-pthread Adds support for multithreading with the pthreads library.
|
||||||
|
#This option sets flags for both the preprocessor and linker. (man gcc)
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
list(APPEND Boost_LIBRARIES -pthread)
|
||||||
|
endif()
|
||||||
|
|
||||||
GR_OSMOSDR_APPEND_LIBS(
|
GR_OSMOSDR_APPEND_LIBS(
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
|
|
Loading…
Reference in New Issue