mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-12 19:20:32 +00:00
Remove duplicate libraries warning emitted by Xcode 15
This commit is contained in:
parent
fc695cb6f6
commit
fd5174e7ec
@ -4,12 +4,12 @@
|
||||
# SPDX-FileCopyrightText: 2011-2024 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
if(DEFINED __INCLUDED_XCODE_DELETE_DUPLICATES_CMAKE)
|
||||
if(DEFINED __INCLUDED_XCODE_REMOVE_WARNING_DUPLICATES_CMAKE)
|
||||
return()
|
||||
endif()
|
||||
set(__INCLUDED_XCODE_DELETE_DUPLICATES_CMAKE TRUE)
|
||||
set(__INCLUDED_XCODE_REMOVE_WARNING_DUPLICATES_CMAKE TRUE)
|
||||
|
||||
function(xcode_delete_duplicates target)
|
||||
function(xcode_remove_warning_duplicates target)
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
|
||||
# A bug in Xcode 15 adds duplicate flags to the linker. In addition, the
|
@ -77,8 +77,8 @@ if(UNIX)
|
||||
)
|
||||
endif()
|
||||
|
||||
include(XcodeDeleteDuplicates)
|
||||
xcode_delete_duplicates(volk_gnsssdr_profile)
|
||||
include(XcodeRemoveWarningDuplicates)
|
||||
xcode_remove_warning_duplicates(volk_gnsssdr_profile)
|
||||
|
||||
if(ENABLE_STRIP)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
@ -109,7 +109,7 @@ if(UNIX)
|
||||
)
|
||||
endif()
|
||||
|
||||
xcode_delete_duplicates(volk_gnsssdr-config-info)
|
||||
xcode_remove_warning_duplicates(volk_gnsssdr-config-info)
|
||||
|
||||
if(ENABLE_STRIP)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
|
@ -4,12 +4,12 @@
|
||||
# SPDX-FileCopyrightText: 2011-2024 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
if(DEFINED __INCLUDED_XCODE_DELETE_DUPLICATES_CMAKE)
|
||||
if(DEFINED __INCLUDED_XCODE_REMOVE_WARNING_DUPLICATES_CMAKE)
|
||||
return()
|
||||
endif()
|
||||
set(__INCLUDED_XCODE_DELETE_DUPLICATES_CMAKE TRUE)
|
||||
set(__INCLUDED_XCODE_REMOVE_WARNING_DUPLICATES_CMAKE TRUE)
|
||||
|
||||
function(xcode_delete_duplicates target)
|
||||
function(xcode_remove_warning_duplicates target)
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
|
||||
# A bug in Xcode 15 adds duplicate flags to the linker. In addition, the
|
@ -4,7 +4,7 @@
|
||||
# SPDX-FileCopyrightText: 2010-2021 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
include(XcodeDeleteDuplicates)
|
||||
include(XcodeRemoveWarningDuplicates)
|
||||
|
||||
########################################################################
|
||||
# header file detection
|
||||
@ -597,7 +597,7 @@ if(NOT (ENABLE_STATIC_LIBS AND (CMAKE_GENERATOR STREQUAL Xcode)))
|
||||
target_link_libraries(volk_gnsssdr PUBLIC ${volk_gnsssdr_libraries})
|
||||
endif()
|
||||
|
||||
xcode_delete_duplicates(volk_gnsssdr)
|
||||
xcode_remove_warning_duplicates(volk_gnsssdr)
|
||||
|
||||
target_include_directories(volk_gnsssdr
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||
@ -680,7 +680,7 @@ if(ENABLE_STATIC_LIBS)
|
||||
)
|
||||
set_target_properties(volk_gnsssdr_static PROPERTIES OUTPUT_NAME volk_gnsssdr)
|
||||
|
||||
xcode_delete_duplicates(volk_gnsssdr_static)
|
||||
xcode_remove_warning_duplicates(volk_gnsssdr_static)
|
||||
|
||||
install(TARGETS volk_gnsssdr_static
|
||||
EXPORT VOLK_GNSSSDR-export
|
||||
@ -709,7 +709,7 @@ if(ENABLE_TESTING)
|
||||
)
|
||||
endif()
|
||||
|
||||
xcode_delete_duplicates(volk_gnsssdr_test_all)
|
||||
xcode_remove_warning_duplicates(volk_gnsssdr_test_all)
|
||||
|
||||
foreach(kernel ${h_files})
|
||||
get_filename_component(kernel ${kernel} NAME)
|
||||
|
@ -65,8 +65,8 @@ if(ENABLE_STRIP)
|
||||
set_target_properties(gnss-sdr PROPERTIES LINK_FLAGS "-s")
|
||||
endif()
|
||||
|
||||
include(XcodeDeleteDuplicates)
|
||||
xcode_delete_duplicates(gnss-sdr)
|
||||
include(XcodeRemoveWarningDuplicates)
|
||||
xcode_remove_warning_duplicates(gnss-sdr)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
|
@ -8,7 +8,7 @@
|
||||
add_subdirectory(unit-tests/signal-processing-blocks/libs)
|
||||
add_subdirectory(system-tests/libs)
|
||||
|
||||
include(XcodeDeleteDuplicates)
|
||||
include(XcodeRemoveWarningDuplicates)
|
||||
|
||||
################################################################################
|
||||
# Google Test - https://github.com/google/googletest
|
||||
@ -647,7 +647,7 @@ if(ENABLE_UNIT_TESTING)
|
||||
target_compile_definitions(run_tests PRIVATE -DGNSSTK_OLDER_THAN_9=1)
|
||||
endif()
|
||||
endif()
|
||||
xcode_delete_duplicates(run_tests)
|
||||
xcode_remove_warning_duplicates(run_tests)
|
||||
if(ENABLE_STRIP)
|
||||
set_target_properties(run_tests PROPERTIES LINK_FLAGS "-s")
|
||||
endif()
|
||||
@ -827,7 +827,7 @@ function(add_system_test executable)
|
||||
)
|
||||
endif()
|
||||
|
||||
xcode_delete_duplicates(${executable})
|
||||
xcode_remove_warning_duplicates(${executable})
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
@ -944,7 +944,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
||||
${GNSSSDR_SOURCE_DIR}/src/algorithms/libs
|
||||
)
|
||||
|
||||
xcode_delete_duplicates(flowgraph_test)
|
||||
xcode_remove_warning_duplicates(flowgraph_test)
|
||||
|
||||
add_test(flowgraph_test flowgraph_test)
|
||||
|
||||
@ -1001,7 +1001,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
||||
target_compile_definitions(gnss_block_test PRIVATE -DENABLE_FPGA=1)
|
||||
endif()
|
||||
|
||||
xcode_delete_duplicates(gnss_block_test)
|
||||
xcode_remove_warning_duplicates(gnss_block_test)
|
||||
|
||||
add_test(gnss_block_test gnss_block_test)
|
||||
|
||||
@ -1040,7 +1040,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
||||
algorithms_libs
|
||||
)
|
||||
|
||||
xcode_delete_duplicates(gnuradio_block_test)
|
||||
xcode_remove_warning_duplicates(gnuradio_block_test)
|
||||
|
||||
add_test(gnuradio_block_test gnuradio_block_test)
|
||||
|
||||
@ -1076,7 +1076,7 @@ target_include_directories(matio_test
|
||||
${GNSSSDR_SOURCE_DIR}/src/tests/common-files
|
||||
)
|
||||
|
||||
xcode_delete_duplicates(matio_test)
|
||||
xcode_remove_warning_duplicates(matio_test)
|
||||
|
||||
add_test(matio_test matio_test)
|
||||
|
||||
@ -1127,7 +1127,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
||||
)
|
||||
endif()
|
||||
|
||||
xcode_delete_duplicates(acq_test)
|
||||
xcode_remove_warning_duplicates(acq_test)
|
||||
|
||||
add_test(acq_test acq_test)
|
||||
|
||||
@ -1225,7 +1225,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
||||
)
|
||||
endif()
|
||||
|
||||
xcode_delete_duplicates(trk_test)
|
||||
xcode_remove_warning_duplicates(trk_test)
|
||||
|
||||
add_test(trk_test trk_test)
|
||||
|
||||
@ -1258,7 +1258,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
||||
core_receiver
|
||||
)
|
||||
|
||||
xcode_delete_duplicates(control_thread_test)
|
||||
xcode_remove_warning_duplicates(control_thread_test)
|
||||
|
||||
add_test(control_thread_test control_thread_test)
|
||||
|
||||
|
@ -102,8 +102,8 @@ if(PMT_USES_BOOST_ANY)
|
||||
)
|
||||
endif()
|
||||
|
||||
include(XcodeDeleteDuplicates)
|
||||
xcode_delete_duplicates(front-end-cal)
|
||||
include(XcodeRemoveWarningDuplicates)
|
||||
xcode_remove_warning_duplicates(front-end-cal)
|
||||
|
||||
if(ENABLE_STRIP)
|
||||
set_target_properties(front-end-cal PROPERTIES LINK_FLAGS "-s")
|
||||
|
@ -110,6 +110,9 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND
|
||||
set_target_properties(obsdiff PROPERTIES LINK_FLAGS "-s")
|
||||
endif()
|
||||
|
||||
include(XcodeRemoveWarningDuplicates)
|
||||
xcode_remove_warning_duplicates(obsdiff)
|
||||
|
||||
add_custom_command(TARGET obsdiff POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:obsdiff>
|
||||
${LOCAL_INSTALL_BASE_DIR}/install/$<TARGET_FILE_NAME:obsdiff>
|
||||
|
Loading…
Reference in New Issue
Block a user