mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-08-05 21:33:47 +00:00
Fixes for modern OpenCL versions
This commit is contained in:
parent
a2dcf223f0
commit
9318fe540d
@ -68,6 +68,7 @@ endif()
|
|||||||
|
|
||||||
target_link_libraries(acquisition_gr_blocks
|
target_link_libraries(acquisition_gr_blocks
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
algorithms_libs
|
||||||
Gnuradio::runtime
|
Gnuradio::runtime
|
||||||
Gnuradio::fft
|
Gnuradio::fft
|
||||||
Volk::volk
|
Volk::volk
|
||||||
@ -79,7 +80,7 @@ target_link_libraries(acquisition_gr_blocks
|
|||||||
Glog::glog
|
Glog::glog
|
||||||
Matio::matio
|
Matio::matio
|
||||||
Volkgnsssdr::volkgnsssdr
|
Volkgnsssdr::volkgnsssdr
|
||||||
algorithms_libs
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(acquisition_gr_blocks
|
target_include_directories(acquisition_gr_blocks
|
||||||
@ -91,6 +92,10 @@ target_include_directories(acquisition_gr_blocks
|
|||||||
|
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
target_link_libraries(acquisition_gr_blocks PUBLIC OpenCL::OpenCL)
|
target_link_libraries(acquisition_gr_blocks PUBLIC OpenCL::OpenCL)
|
||||||
|
target_include_directories(acquisition_gr_blocks
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_SOURCE_DIR}/src/algorithms/libs/opencl
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CLANG_TIDY)
|
if(ENABLE_CLANG_TIDY)
|
||||||
@ -105,4 +110,5 @@ endif()
|
|||||||
set_property(TARGET acquisition_gr_blocks
|
set_property(TARGET acquisition_gr_blocks
|
||||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs/opencl>
|
||||||
)
|
)
|
||||||
|
@ -51,8 +51,10 @@
|
|||||||
#ifndef GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
|
#ifndef GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
|
||||||
#define GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
|
#define GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
|
||||||
|
|
||||||
|
#define CL_SILENCE_DEPRECATION
|
||||||
#include "channel_fsm.h"
|
#include "channel_fsm.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
|
#include "opencl/cl.hpp"
|
||||||
#include "opencl/fft_internal.h"
|
#include "opencl/fft_internal.h"
|
||||||
#include <gnuradio/block.h>
|
#include <gnuradio/block.h>
|
||||||
#include <gnuradio/fft/fft.h>
|
#include <gnuradio/fft/fft.h>
|
||||||
@ -62,13 +64,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#define CL_SILENCE_DEPRECATION
|
|
||||||
#include "opencl/cl.hpp"
|
|
||||||
#else
|
|
||||||
#include <CL/cl.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class pcps_opencl_acquisition_cc;
|
class pcps_opencl_acquisition_cc;
|
||||||
|
|
||||||
typedef boost::shared_ptr<pcps_opencl_acquisition_cc> pcps_opencl_acquisition_cc_sptr;
|
typedef boost::shared_ptr<pcps_opencl_acquisition_cc> pcps_opencl_acquisition_cc_sptr;
|
||||||
|
@ -120,6 +120,7 @@ endif()
|
|||||||
|
|
||||||
if(OPENCL_FOUND)
|
if(OPENCL_FOUND)
|
||||||
message(STATUS "Adding processing blocks implemented using OpenCL")
|
message(STATUS "Adding processing blocks implemented using OpenCL")
|
||||||
|
target_link_libraries(core_receiver PUBLIC algorithms_libs OpenCL::OpenCL)
|
||||||
target_compile_definitions(core_receiver PRIVATE -DOPENCL_BLOCKS=1)
|
target_compile_definitions(core_receiver PRIVATE -DOPENCL_BLOCKS=1)
|
||||||
else()
|
else()
|
||||||
target_compile_definitions(core_receiver PRIVATE -DOPENCL_BLOCKS=0)
|
target_compile_definitions(core_receiver PRIVATE -DOPENCL_BLOCKS=0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user