Adding support for MKL fft

master
Paul Sutton 9 years ago
parent 24926ed648
commit 925e83577b

@ -0,0 +1,27 @@
# - Try to find mkl - the Intel Math Kernel Library
# Once done this will define
# MKL_FOUND - System has mkl
# MKL_INCLUDE_DIRS - The mkl include directories
# MKL_LIBRARIES - The libraries needed to use mkl
# MKL_DEFINITIONS - Compiler switches required for using mkl
find_path(MKL_INCLUDE_DIR
NAMES mkl.h
HINTS $ENV{MKL_DIR}/include
PATHS)
find_library(MKL_LIBRARY
NAMES mkl_rt
HINTS $ENV{MKL_DIR}/lib/intel64
PATHS)
set(MKL_LIBRARIES ${MKL_LIBRARY} )
set(MKL_INCLUDE_DIRS ${MKL_INCLUDE_DIR} )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set MKL_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(mkl DEFAULT_MSG
MKL_LIBRARY MKL_INCLUDE_DIR)
mark_as_advanced(MKL_INCLUDE_DIR MKL_LIBRARY )

@ -42,11 +42,18 @@ add_custom_target (add_srslte_headers SOURCES ${HEADERS_ALL})
######################################################################## ########################################################################
# Find Dependencies # Find Dependencies
######################################################################## ########################################################################
find_package(FFTW3F REQUIRED)
if(FFTW3F_FOUND) find_package(MKL)
include_directories(${FFTW3F_INCLUDE_DIRS}) if(MKL_FOUND)
link_directories(${FFTW3F_LIBRARY_DIRS}) include_directories(${MKL_INCLUDE_DIRS})
endif(FFTW3F_FOUND) link_directories(${MKL_LIBRARY_DIRS})
else(MKL_FOUND)
find_package(FFTW3F REQUIRED)
if(FFTW3F_FOUND)
include_directories(${FFTW3F_INCLUDE_DIRS})
link_directories(${FFTW3F_LIBRARY_DIRS})
endif(FFTW3F_FOUND)
endif(MKL_FOUND)
find_package(UHD) find_package(UHD)
if(UHD_FOUND) if(UHD_FOUND)

@ -76,10 +76,16 @@ if(NOT DisableMEX)
) )
endif(NOT DisableMEX) endif(NOT DisableMEX)
target_link_libraries(srslte pthread m ${FFTW3F_LIBRARIES}) target_link_libraries(srslte pthread m)
set_target_properties(srslte PROPERTIES set_target_properties(srslte PROPERTIES
VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}) VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR})
if(MKL_FOUND)
target_link_libraries(srslte ${MKL_LIBRARIES})
else(MKL_FOUND)
target_link_libraries(srslte ${FFTW3F_LIBRARIES})
endif(MKL_FOUND)
if(RF_FOUND) if(RF_FOUND)
if(UHD_FOUND) if(UHD_FOUND)
target_link_libraries(srslte ${UHD_LIBRARIES}) target_link_libraries(srslte ${UHD_LIBRARIES})

Loading…
Cancel
Save