mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-03 08:43:04 +00:00
Create OpenCL imported target
This commit is contained in:
@@ -49,16 +49,6 @@ if(OPENCL_FOUND)
|
||||
set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_opencl_acquisition_cc.h)
|
||||
endif()
|
||||
|
||||
|
||||
if(OPENCL_FOUND)
|
||||
include_directories(${OPENCL_INCLUDE_DIRS})
|
||||
if(OS_IS_MACOSX)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL")
|
||||
else()
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${OPENCL_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(SORT ACQ_GR_BLOCKS_HEADERS)
|
||||
list(SORT ACQ_GR_BLOCKS_SOURCES)
|
||||
|
||||
@@ -84,7 +74,6 @@ target_link_libraries(acquisition_gr_blocks
|
||||
channel_libs
|
||||
acquisition_libs
|
||||
core_system_parameters
|
||||
${OPT_LIBRARIES}
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
@@ -101,7 +90,7 @@ target_include_directories(acquisition_gr_blocks
|
||||
)
|
||||
|
||||
if(OPENCL_FOUND)
|
||||
target_include_directories(acquisition_gr_blocks PUBLIC ${OPENCL_INCLUDE_DIRS})
|
||||
target_link_libraries(acquisition_gr_blocks PUBLIC OpenCL::OpenCL)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#include <vector>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define CL_SILENCE_DEPRECATION
|
||||
#include "opencl/cl.hpp"
|
||||
#else
|
||||
#include <CL/cl.hpp>
|
||||
|
||||
Reference in New Issue
Block a user