mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-11-04 09:13:05 +00:00 
			
		
		
		
	Add Boost::atomic target, required by Boost::thread in some configurations (e.g. OpenSUSE)
This commit is contained in:
		@@ -501,7 +501,7 @@ set(Boost_ADDITIONAL_VERSIONS
 | 
			
		||||
)
 | 
			
		||||
set(Boost_USE_MULTITHREAD ON)
 | 
			
		||||
set(Boost_USE_STATIC_LIBS OFF)
 | 
			
		||||
find_package(Boost COMPONENTS date_time system filesystem thread serialization chrono REQUIRED)
 | 
			
		||||
find_package(Boost COMPONENTS date_time system filesystem thread serialization chrono atomic REQUIRED)
 | 
			
		||||
if(NOT Boost_FOUND)
 | 
			
		||||
    message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.")
 | 
			
		||||
endif()
 | 
			
		||||
@@ -568,6 +568,15 @@ if(CMAKE_VERSION VERSION_LESS 3.5)
 | 
			
		||||
        set_property(TARGET Boost::chrono PROPERTY
 | 
			
		||||
            IMPORTED_LOCATION ${Boost_CHRONO_LIBRARIES})
 | 
			
		||||
    endif()
 | 
			
		||||
    if(NOT TARGET Boost::atomic)
 | 
			
		||||
        add_library(Boost::atomic SHARED IMPORTED)
 | 
			
		||||
        set_property(TARGET Boost::atomic PROPERTY
 | 
			
		||||
            INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
 | 
			
		||||
        set_property(TARGET Boost::atomic PROPERTY
 | 
			
		||||
        INTERFACE_LINK_LIBRARIES ${Boost_ATOMIC_LIBRARIES})
 | 
			
		||||
        set_property(TARGET Boost::atomic PROPERTY
 | 
			
		||||
            IMPORTED_LOCATION ${Boost_ATOMIC_LIBRARIES})
 | 
			
		||||
    endif()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -40,17 +40,12 @@ target_link_libraries(front_end_cal_lib
 | 
			
		||||
        Glog::glog
 | 
			
		||||
        Gnuradio::blocks
 | 
			
		||||
        Gnuradio::runtime
 | 
			
		||||
        Boost::boost
 | 
			
		||||
        Boost::serialization
 | 
			
		||||
        Boost::thread
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
 | 
			
		||||
 | 
			
		||||
add_custom_command(TARGET front-end-cal POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:front-end-cal>
 | 
			
		||||
        ${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
 | 
			
		||||
 | 
			
		||||
target_link_libraries(front-end-cal
 | 
			
		||||
    PUBLIC
 | 
			
		||||
        ${MAC_LIBRARIES}
 | 
			
		||||
@@ -70,6 +65,10 @@ target_compile_definitions(front-end-cal
 | 
			
		||||
    PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
add_custom_command(TARGET front-end-cal POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:front-end-cal>
 | 
			
		||||
        ${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
 | 
			
		||||
 | 
			
		||||
install(TARGETS front-end-cal
 | 
			
		||||
    RUNTIME DESTINATION bin
 | 
			
		||||
    COMPONENT "front-end-cal"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user