1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

Fixes for modern OpenCL versions

This commit is contained in:
Carles Fernandez 2019-06-24 13:39:34 +02:00
parent a2dcf223f0
commit 9318fe540d
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 10 additions and 8 deletions

View File

@ -68,6 +68,7 @@ endif()
target_link_libraries(acquisition_gr_blocks
PUBLIC
algorithms_libs
Gnuradio::runtime
Gnuradio::fft
Volk::volk
@ -79,7 +80,7 @@ target_link_libraries(acquisition_gr_blocks
Glog::glog
Matio::matio
Volkgnsssdr::volkgnsssdr
algorithms_libs
)
target_include_directories(acquisition_gr_blocks
@ -91,6 +92,10 @@ target_include_directories(acquisition_gr_blocks
if(OPENCL_FOUND)
target_link_libraries(acquisition_gr_blocks PUBLIC OpenCL::OpenCL)
target_include_directories(acquisition_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/algorithms/libs/opencl
)
endif()
if(ENABLE_CLANG_TIDY)
@ -105,4 +110,5 @@ endif()
set_property(TARGET acquisition_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs/opencl>
)

View File

@ -51,8 +51,10 @@
#ifndef GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
#define GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
#define CL_SILENCE_DEPRECATION
#include "channel_fsm.h"
#include "gnss_synchro.h"
#include "opencl/cl.hpp"
#include "opencl/fft_internal.h"
#include <gnuradio/block.h>
#include <gnuradio/fft/fft.h>
@ -62,13 +64,6 @@
#include <string>
#include <vector>
#ifdef __APPLE__
#define CL_SILENCE_DEPRECATION
#include "opencl/cl.hpp"
#else
#include <CL/cl.hpp>
#endif
class pcps_opencl_acquisition_cc;
typedef boost::shared_ptr<pcps_opencl_acquisition_cc> pcps_opencl_acquisition_cc_sptr;

View File

@ -120,6 +120,7 @@ endif()
if(OPENCL_FOUND)
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)
else()
target_compile_definitions(core_receiver PRIVATE -DOPENCL_BLOCKS=0)