mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-10-31 23:26:22 +00:00
Remove RemoveDuplicates.cmake
This commit is contained in:
parent
df999a45e7
commit
a50a59fe1b
@ -1,22 +0,0 @@
|
|||||||
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
|
||||||
# This file is part of GNSS-SDR.
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2024 C. Fernandez-Prades cfernandez(at)cttc.es
|
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
|
|
||||||
# Usage:
|
|
||||||
# include(RemoveDuplicates)
|
|
||||||
# remove_duplicate_linked_libraries(my_target)
|
|
||||||
|
|
||||||
if(DEFINED __INCLUDED_REMOVE_DUPLICATE_LINKED_LIBRARIES_MODULE)
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
set(__INCLUDED_REMOVE_DUPLICATE_LINKED_LIBRARIES_MODULE TRUE)
|
|
||||||
|
|
||||||
function(remove_duplicate_linked_libraries target_name)
|
|
||||||
if(CMAKE_VERSION VERSION_GREATER 3.5)
|
|
||||||
get_target_property(LINK_LIBRARIES ${target_name} LINK_LIBRARIES)
|
|
||||||
list(REMOVE_DUPLICATES LINK_LIBRARIES)
|
|
||||||
set_target_properties(${target_name} PROPERTIES LINK_LIBRARIES "${LINK_LIBRARIES}")
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
@ -60,8 +60,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||||||
target_link_libraries(gnss-sdr PRIVATE "-lc++")
|
target_link_libraries(gnss-sdr PRIVATE "-lc++")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
include(RemoveDuplicates)
|
|
||||||
remove_duplicate_linked_libraries(gnss-sdr)
|
|
||||||
|
|
||||||
if(ENABLE_STRIP)
|
if(ENABLE_STRIP)
|
||||||
set_target_properties(gnss-sdr PROPERTIES LINK_FLAGS "-s")
|
set_target_properties(gnss-sdr PROPERTIES LINK_FLAGS "-s")
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
add_subdirectory(unit-tests/signal-processing-blocks/libs)
|
add_subdirectory(unit-tests/signal-processing-blocks/libs)
|
||||||
add_subdirectory(system-tests/libs)
|
add_subdirectory(system-tests/libs)
|
||||||
include(RemoveDuplicates)
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Google Test - https://github.com/google/googletest
|
# Google Test - https://github.com/google/googletest
|
||||||
@ -646,7 +645,6 @@ if(ENABLE_UNIT_TESTING)
|
|||||||
target_compile_definitions(run_tests PRIVATE -DGNSSTK_OLDER_THAN_9=1)
|
target_compile_definitions(run_tests PRIVATE -DGNSSTK_OLDER_THAN_9=1)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
remove_duplicate_linked_libraries(run_tests)
|
|
||||||
if(ENABLE_STRIP)
|
if(ENABLE_STRIP)
|
||||||
set_target_properties(run_tests PROPERTIES LINK_FLAGS "-s")
|
set_target_properties(run_tests PROPERTIES LINK_FLAGS "-s")
|
||||||
endif()
|
endif()
|
||||||
@ -769,7 +767,6 @@ if(ENABLE_FPGA)
|
|||||||
target_include_directories(gps_l1_ca_dll_pll_tracking_test_fpga
|
target_include_directories(gps_l1_ca_dll_pll_tracking_test_fpga
|
||||||
INTERFACE ${GNSSSDR_SOURCE_DIR}/src/tests/common-files
|
INTERFACE ${GNSSSDR_SOURCE_DIR}/src/tests/common-files
|
||||||
)
|
)
|
||||||
remove_duplicate_linked_libraries(gps_l1_ca_dll_pll_tracking_test_fpga)
|
|
||||||
install(TARGETS gps_l1_ca_dll_pll_tracking_test_fpga
|
install(TARGETS gps_l1_ca_dll_pll_tracking_test_fpga
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
COMPONENT "fpga-test"
|
COMPONENT "fpga-test"
|
||||||
@ -859,7 +856,6 @@ if(ENABLE_SYSTEM_TESTING)
|
|||||||
)
|
)
|
||||||
if(NOT ENABLE_PACKAGING)
|
if(NOT ENABLE_PACKAGING)
|
||||||
add_system_test(ttff)
|
add_system_test(ttff)
|
||||||
remove_duplicate_linked_libraries(ttff)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_SYSTEM_TESTING_EXTRA)
|
if(ENABLE_SYSTEM_TESTING_EXTRA)
|
||||||
@ -881,7 +877,6 @@ if(ENABLE_SYSTEM_TESTING)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
remove_duplicate_linked_libraries(position_test)
|
|
||||||
if(NOT GNSSSIMULATOR_FOUND OR ENABLE_GNSS_SIM_INSTALL)
|
if(NOT GNSSSIMULATOR_FOUND OR ENABLE_GNSS_SIM_INSTALL)
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
add_dependencies(position_test gnss-sim)
|
add_dependencies(position_test gnss-sim)
|
||||||
@ -942,7 +937,6 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
${GNSSSDR_SOURCE_DIR}/src/algorithms/libs
|
${GNSSSDR_SOURCE_DIR}/src/algorithms/libs
|
||||||
)
|
)
|
||||||
remove_duplicate_linked_libraries(flowgraph_test)
|
|
||||||
add_test(flowgraph_test flowgraph_test)
|
add_test(flowgraph_test flowgraph_test)
|
||||||
|
|
||||||
set_property(TEST flowgraph_test PROPERTY TIMEOUT 30)
|
set_property(TEST flowgraph_test PROPERTY TIMEOUT 30)
|
||||||
@ -997,7 +991,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
|||||||
if(ENABLE_FPGA)
|
if(ENABLE_FPGA)
|
||||||
target_compile_definitions(gnss_block_test PRIVATE -DENABLE_FPGA=1)
|
target_compile_definitions(gnss_block_test PRIVATE -DENABLE_FPGA=1)
|
||||||
endif()
|
endif()
|
||||||
remove_duplicate_linked_libraries(gnss_block_test)
|
|
||||||
add_test(gnss_block_test gnss_block_test)
|
add_test(gnss_block_test gnss_block_test)
|
||||||
|
|
||||||
set_property(TEST gnss_block_test PROPERTY TIMEOUT 60)
|
set_property(TEST gnss_block_test PROPERTY TIMEOUT 60)
|
||||||
@ -1034,7 +1028,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
|||||||
core_receiver
|
core_receiver
|
||||||
algorithms_libs
|
algorithms_libs
|
||||||
)
|
)
|
||||||
remove_duplicate_linked_libraries(gnuradio_block_test)
|
|
||||||
add_test(gnuradio_block_test gnuradio_block_test)
|
add_test(gnuradio_block_test gnuradio_block_test)
|
||||||
|
|
||||||
set_property(TEST gnuradio_block_test PROPERTY TIMEOUT 30)
|
set_property(TEST gnuradio_block_test PROPERTY TIMEOUT 30)
|
||||||
@ -1068,7 +1062,7 @@ target_include_directories(matio_test
|
|||||||
INTERFACE
|
INTERFACE
|
||||||
${GNSSSDR_SOURCE_DIR}/src/tests/common-files
|
${GNSSSDR_SOURCE_DIR}/src/tests/common-files
|
||||||
)
|
)
|
||||||
remove_duplicate_linked_libraries(matio_test)
|
|
||||||
add_test(matio_test matio_test)
|
add_test(matio_test matio_test)
|
||||||
|
|
||||||
set_property(TEST matio_test PROPERTY TIMEOUT 30)
|
set_property(TEST matio_test PROPERTY TIMEOUT 30)
|
||||||
@ -1117,7 +1111,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
|||||||
-DPMT_USES_BOOST_ANY=1
|
-DPMT_USES_BOOST_ANY=1
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
remove_duplicate_linked_libraries(acq_test)
|
|
||||||
add_test(acq_test acq_test)
|
add_test(acq_test acq_test)
|
||||||
|
|
||||||
if(USE_GENERIC_LAMBDAS)
|
if(USE_GENERIC_LAMBDAS)
|
||||||
@ -1213,7 +1207,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
|||||||
-DPMT_USES_BOOST_ANY=1
|
-DPMT_USES_BOOST_ANY=1
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
remove_duplicate_linked_libraries(trk_test)
|
|
||||||
add_test(trk_test trk_test)
|
add_test(trk_test trk_test)
|
||||||
|
|
||||||
set_property(TEST trk_test PROPERTY TIMEOUT 30)
|
set_property(TEST trk_test PROPERTY TIMEOUT 30)
|
||||||
@ -1244,7 +1238,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
|||||||
algorithms_libs
|
algorithms_libs
|
||||||
core_receiver
|
core_receiver
|
||||||
)
|
)
|
||||||
remove_duplicate_linked_libraries(control_thread_test)
|
|
||||||
add_test(control_thread_test control_thread_test)
|
add_test(control_thread_test control_thread_test)
|
||||||
|
|
||||||
set_property(TEST control_thread_test PROPERTY TIMEOUT 30)
|
set_property(TEST control_thread_test PROPERTY TIMEOUT 30)
|
||||||
|
Loading…
Reference in New Issue
Block a user