mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-15 19:55:47 +00:00
Make use of Threads::Threads target
This commit is contained in:
parent
7440088bce
commit
97e8d9931e
@ -437,7 +437,7 @@ endif()
|
|||||||
################################################################################
|
################################################################################
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.1)
|
if(CMAKE_VERSION VERSION_LESS 3.1)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
set(THREAD_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
add_library(Threads::Threads ALIAS ${CMAKE_THREAD_LIBS_INIT})
|
||||||
else()
|
else()
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
@ -446,7 +446,6 @@ else()
|
|||||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||||
endif()
|
endif()
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
set(THREAD_LIBRARIES Threads::Threads)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@ -1101,7 +1100,6 @@ endif()
|
|||||||
|
|
||||||
if(NOT ENABLE_LOG)
|
if(NOT ENABLE_LOG)
|
||||||
message(STATUS "Logging is not enabled")
|
message(STATUS "Logging is not enabled")
|
||||||
target_compile_definitions(Glog::glog PUBLIC -DGOOGLE_STRIP_LOG=1)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,12 +17,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
if(OS_IS_MACOSX)
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
||||||
set(MAC_LIBRARIES "-lc++")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
||||||
|
|
||||||
target_link_libraries(gnss-sdr
|
target_link_libraries(gnss-sdr
|
||||||
@ -33,8 +27,7 @@ target_link_libraries(gnss-sdr
|
|||||||
Glog::glog
|
Glog::glog
|
||||||
gnss_rx
|
gnss_rx
|
||||||
gnss_sdr_flags
|
gnss_sdr_flags
|
||||||
${THREAD_LIBRARIES}
|
Threads::Threads
|
||||||
${MAC_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Disable internal logging
|
# Disable internal logging
|
||||||
@ -70,6 +63,15 @@ if(ENABLE_GPERFTOOLS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(OS_IS_MACOSX)
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
target_link_libraries(gnss-sdr
|
||||||
|
PUBLIC
|
||||||
|
"-lc++"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_command(TARGET gnss-sdr
|
add_custom_command(TARGET gnss-sdr
|
||||||
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gnss-sdr>
|
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gnss-sdr>
|
||||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:gnss-sdr>
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:gnss-sdr>
|
||||||
|
@ -96,7 +96,7 @@ if(NOT ${GTEST_DIR_LOCAL})
|
|||||||
set(GTEST_LIBRARIES
|
set(GTEST_LIBRARIES
|
||||||
${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
${THREAD_LIBRARIES})
|
Threads::Threads)
|
||||||
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest")
|
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest")
|
||||||
else()
|
else()
|
||||||
if(GTEST_INCLUDE_DIRS)
|
if(GTEST_INCLUDE_DIRS)
|
||||||
@ -110,7 +110,7 @@ else()
|
|||||||
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
|
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
|
||||||
set(GTEST_LIBRARIES gtest)
|
set(GTEST_LIBRARIES gtest)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(gtest PUBLIC ${THREAD_LIBRARIES})
|
target_link_libraries(gtest PUBLIC Threads::Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ if(ENABLE_SYSTEM_TESTING)
|
|||||||
add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
|
add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
|
||||||
|
|
||||||
#### TTFF
|
#### TTFF
|
||||||
set(OPT_LIBS_ ${Boost_LIBRARIES} ${THREAD_LIBRARIES} Gflags::gflags Glog::glog
|
set(OPT_LIBS_ ${Boost_LIBRARIES} Threads::Threads Gflags::gflags Glog::glog
|
||||||
Gnuradio::runtime ${GTEST_LIBRARIES}
|
Gnuradio::runtime ${GTEST_LIBRARIES}
|
||||||
Gnuradio::blocks Gnuradio::filter
|
Gnuradio::blocks Gnuradio::filter
|
||||||
Gnuradio::analog gnss_sp_libs
|
Gnuradio::analog gnss_sp_libs
|
||||||
@ -468,7 +468,7 @@ if(ENABLE_SYSTEM_TESTING)
|
|||||||
|
|
||||||
if(ENABLE_SYSTEM_TESTING_EXTRA)
|
if(ENABLE_SYSTEM_TESTING_EXTRA)
|
||||||
#### POSITION_TEST
|
#### POSITION_TEST
|
||||||
set(OPT_LIBS_ ${Boost_LIBRARIES} ${THREAD_LIBRARIES} Gflags::gflags Glog::glog
|
set(OPT_LIBS_ ${Boost_LIBRARIES} Threads::Threads Gflags::gflags Glog::glog
|
||||||
${GTEST_LIBRARIES} Gnuradio::runtime
|
${GTEST_LIBRARIES} Gnuradio::runtime
|
||||||
Gnuradio::blocks Gnuradio::filter
|
Gnuradio::blocks Gnuradio::filter
|
||||||
Gnuradio::analog Matio::matio Volkgnsssdr::volkgnsssdr
|
Gnuradio::analog Matio::matio Volkgnsssdr::volkgnsssdr
|
||||||
|
@ -26,7 +26,7 @@ source_group(Headers FILES ${FRONT_END_CAL_HEADERS})
|
|||||||
target_link_libraries(front_end_cal_lib
|
target_link_libraries(front_end_cal_lib
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Armadillo::armadillo
|
Armadillo::armadillo
|
||||||
${THREAD_LIBRARIES}
|
Threads::Threads
|
||||||
acq_adapters
|
acq_adapters
|
||||||
Volkgnsssdr::volkgnsssdr ${ORC_LIBRARIES}
|
Volkgnsssdr::volkgnsssdr ${ORC_LIBRARIES}
|
||||||
rx_core_lib
|
rx_core_lib
|
||||||
@ -35,6 +35,7 @@ target_link_libraries(front_end_cal_lib
|
|||||||
channel_fsm
|
channel_fsm
|
||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
Gnuradio::blocks
|
Gnuradio::blocks
|
||||||
Gnuradio::runtime
|
Gnuradio::runtime
|
||||||
|
Loading…
Reference in New Issue
Block a user