-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #419 from clEsperanto/project-dependencies
Project dependencies
- Loading branch information
Showing
6 changed files
with
27 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,25 @@ | ||
include(FetchContent) | ||
set(FETCHCONTENT_BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
## Fetch OpenCL kernel sources | ||
FetchContent_Declare(kernels | ||
FetchContent_Declare(cleKernels | ||
GIT_REPOSITORY https://github.com/clEsperanto/clij-opencl-kernels.git | ||
GIT_TAG ${kernel_version_tag} | ||
BUILD_ALWAYS OFF | ||
) | ||
FetchContent_GetProperties(kernels) | ||
if(NOT kernels_POPULATED) | ||
FetchContent_Populate(kernels) | ||
endif() | ||
FetchContent_MakeAvailable(cleKernels) | ||
|
||
## Fetch Eigen library sources | ||
FetchContent_Declare(eigen | ||
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git | ||
GIT_TAG ${eigen_lib_version_tag} | ||
BUILD_ALWAYS OFF | ||
) | ||
FetchContent_GetProperties(eigen) | ||
if(NOT Eigen_POPULATED) | ||
FetchContent_Populate(eigen) | ||
endif() | ||
FetchContent_MakeAvailable(eigen) | ||
|
||
## Define the path to the thirdparty libraries and include directories | ||
set(KERNELS_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/kernels-src CACHE PATH "Path to opencl kernel files (.cl)" FORCE) | ||
mark_as_advanced(KERNELS_SOURCE_DIR) | ||
set(KERNELS_HEADER_DIR ${CMAKE_CURRENT_BINARY_DIR}/kernels CACHE PATH "Path to kernel files (.h)" FORCE) | ||
mark_as_advanced(KERNELS_HEADER_DIR) | ||
set(EIGEN_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/eigen-src CACHE PATH "Path to eigen lib" FORCE) | ||
mark_as_advanced(EIGEN_SOURCE_DIR) | ||
|
||
## Define target to generate kernel headers from kernel files (.cl -> .h) | ||
find_package(Python3 COMPONENTS Interpreter REQUIRED) | ||
add_custom_command( | ||
OUTPUT ${KERNELS_HEADER_DIR} | ||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/kernel_to_header.py ${KERNELS_SOURCE_DIR} ${KERNELS_HEADER_DIR} | ||
COMMENT "Generating headers from clesperanto kernels files." | ||
DEPENDS ${KERNELS_SOURCE_DIR} | ||
) | ||
add_custom_target( | ||
generate_kernels | ||
DEPENDS ${KERNELS_HEADER_DIR} | ||
) | ||
# Future work - integration of clFFT library for deconvolution operations | ||
## Fetch clFFT library sources | ||
# FetchContent_Declare(clfft | ||
# GIT_REPOSITORY https://github.com/clMathLibraries/clFFT.git | ||
# GIT_TAG master | ||
# SOURCE_SUBDIR src # clFFT CMakeLists.txt is in src/ instead of root | ||
# ) | ||
# FetchContent_MakeAvailable(clfft) | ||
# clFFT linking usinge the variable ${CLFFT_LIBRARIES} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters