Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
cd3a98c8
Commit
cd3a98c8
authored
Aug 09, 2017
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use cmake-provide module to find OpenCL
parent
c351c48d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
43 deletions
+10
-43
CMakeLists.txt
CMakeLists.txt
+9
-4
cmake/FindOpenCL.cmake
cmake/FindOpenCL.cmake
+0
-38
libcaf_opencl/CMakeLists.txt
libcaf_opencl/CMakeLists.txt
+1
-1
No files found.
CMakeLists.txt
View file @
cd3a98c8
...
@@ -511,12 +511,17 @@ endif()
...
@@ -511,12 +511,17 @@ endif()
# build opencl library if not told otherwise and OpenCL package was found
# build opencl library if not told otherwise and OpenCL package was found
if
(
NOT CAF_NO_OPENCL
)
if
(
NOT CAF_NO_OPENCL
)
find_package
(
OpenCL
)
if
(
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
GREATER 3.0
)
if
(
OpenCL_FOUND
)
find_package
(
OpenCL
)
add_optional_caf_lib
(
opencl
)
if
(
OpenCL_FOUND
)
add_optional_caf_binaries
(
libcaf_opencl/examples
)
add_optional_caf_lib
(
opencl
)
add_optional_caf_binaries
(
libcaf_opencl/examples
)
else
()
set
(
CAF_NO_OPENCL yes
)
endif
()
else
()
else
()
set
(
CAF_NO_OPENCL yes
)
set
(
CAF_NO_OPENCL yes
)
message
(
STATUS
"Could NOT find OpenCL, requires Cmake >= 3.1."
)
endif
()
endif
()
endif
()
endif
()
...
...
cmake/FindOpenCL.cmake
deleted
100644 → 0
View file @
c351c48d
# - Try to find OpenCL
# Once done this will define
#
# OpenCL_FOUND - system has OpenCL
# OpenCL_INCLUDE_DIRS - the OpenCL include directory
# OpenCL_LIBRARIES - link these to use OpenCL
#
# WIN32 should work, but is untested
IF
(
WIN32
)
FIND_PATH
(
OpenCL_INCLUDE_DIRS CL/cl.h
)
# TODO this is only a hack assuming the 64 bit library will
# not be found on 32 bit system
FIND_LIBRARY
(
OpenCL_LIBRARIES opencl
)
#used to say opencl64
IF
(
OpenCL_LIBRARIES
)
FIND_LIBRARY
(
OpenCL_LIBRARIES opencl
)
#used to say opencl32
ENDIF
(
OpenCL_LIBRARIES
)
ELSE
(
WIN32
)
FIND_LIBRARY
(
OpenCL_LIBRARIES OpenCL ENV LD_LIBRARY_PATH
)
message
(
"-- Found OpenCL:
${
OpenCL_LIBRARIES
}
"
)
ENDIF
(
WIN32
)
SET
(
OpenCL_FOUND
"NO"
)
IF
(
OpenCL_LIBRARIES
)
SET
(
OpenCL_FOUND
"YES"
)
ENDIF
(
OpenCL_LIBRARIES
)
MARK_AS_ADVANCED
(
OpenCL_INCLUDE_DIRS
OpenCL_LIBRARIES
)
libcaf_opencl/CMakeLists.txt
View file @
cd3a98c8
cmake_minimum_required
(
VERSION
2.8
)
cmake_minimum_required
(
VERSION
3.1
)
project
(
caf_opencl C CXX
)
project
(
caf_opencl C CXX
)
# get header files; only needed by CMake generators,
# get header files; only needed by CMake generators,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment