Skip to content

Commit 339fe68

Browse files
committed
Revert "download and build the opencl dependencies with cmake"
1 parent 8b9adad commit 339fe68

File tree

7 files changed

+237
-160
lines changed

7 files changed

+237
-160
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Downloads and builds the Boost Compute library from github.com
2+
# Defines the following variables
3+
# * BoostCompute_FOUND Flag for Boost Compute
4+
# * BoostCompute_INCLUDE_DIR Location of the Boost Compute headers
5+
6+
# Look a directory above for the Boost Compute folder
7+
FIND_PATH( BoostCompute_SOURCE_DIR
8+
NAMES include/boost/compute.hpp
9+
PATH_SUFFIXES compute BoostCompute
10+
DOC "Location of the Boost Compute source directory"
11+
PATHS ${CMAKE_SOURCE_DIR}/..
12+
${CMAKE_SOURCE_DIR}/../..
13+
/usr/local)
14+
15+
FIND_PATH( BoostCompute_INCLUDE_DIR
16+
NAMES boost/compute.hpp
17+
DOC "Location of the Boost Compute include directory."
18+
PATHS ${BoostCompute_SOURCE_DIR}/include)
19+
20+
IF(BoostCompute_INCLUDE_DIR AND BoostCompute_SOURCE_DIR)
21+
SET( BoostCompute_FOUND ON CACHE BOOL "BoostCompute Found" )
22+
ELSE()
23+
SET( BoostCompute_FOUND OFF CACHE BOOL "BoostCompute Found" )
24+
ENDIF()
25+
26+
IF(NOT BoostCompute_FOUND)
27+
MESSAGE(FATAL_ERROR, "Boost.Compute not found! Clone Boost.Compute from https://github.com/kylelutz/compute.git")
28+
ENDIF(NOT BoostCompute_FOUND)
29+
30+
MARK_AS_ADVANCED(
31+
BoostCompute_FOUND
32+
BoostCompute_INCLUDE_DIR
33+
)

CMakeModules/FindCLBLAS.cmake

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# - Find clBLAS, AMD's OpenCL BLAS library
2+
3+
# This script defines the standard variables
4+
# CLBLAS_FOUND - Whether or not clBLAS was located
5+
# CLBLAS_INCLUDE_DIRS - All include directories for clBLAS headers
6+
# CLBLAS_LIBRARIES - All libraries for clBLAS
7+
#
8+
# This script also creates a few non-standard variables that may be useful
9+
# in your project:
10+
#
11+
# CLBLAS_SOURCE_DIR - The location of the clBLAS src directory, if found.
12+
# CLBLAS_PACKAGE_DIR - The location of the clBLAS package directory, if found.
13+
#
14+
# If your clBLAS installation is not in a standard installation directory, you
15+
# may provide a hint to where it may be found. Simply set the value CLBLAS_ROOT
16+
# to the directory containing 'include/clBLAS.h" prior to calling this script.
17+
#
18+
#=============================================================================
19+
# Copyright 2014 Brian Kloppenborg
20+
#
21+
# Licensed under the Apache License, Version 2.0 (the "License");
22+
# you may not use this file except in compliance with the License.
23+
# You may obtain a copy of the License at
24+
#
25+
# http://www.apache.org/licenses/LICENSE-2.0
26+
#
27+
# Unless required by applicable law or agreed to in writing, software
28+
# distributed under the License is distributed on an "AS IS" BASIS,
29+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30+
# See the License for the specific language governing permissions and
31+
# limitations under the License.
32+
#=============================================================================
33+
34+
# Find packages on which clBLAS depends
35+
find_package(OpenCL REQUIRED)
36+
37+
# Set the CLBLAS_ROOT_DIR relative to the current directory.
38+
IF(NOT DEFINED ${CLBLAS_ROOT_DIR})
39+
LIST(APPEND CLBLAS_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. ${CMAKE_SOURCE_DIR}/../..)
40+
ENDIF()
41+
42+
FIND_PATH(CLBLAS_SOURCE_DIR
43+
NAMES src/clBlas.h src/clAmdBlas.h
44+
PATH_SUFFIXES clblas clBLAS clBlas CLBLAS
45+
DOC "Location of the clBLAS source directory"
46+
HINTS ${CLBLAS_ROOT_DIR}
47+
NO_DEFAULT_PATH)
48+
49+
FIND_PATH(CLBLAS_PACKAGE_DIR
50+
NAMES bin include lib64
51+
PATH_SUFFIXES build/package
52+
DOC "Location of the clBLAS install/package directory."
53+
HINTS ${CLBLAS_SOURCE_DIR}
54+
NO_DEFAULT_PATH)
55+
56+
FIND_PATH(_CLBLAS_INCLUDE_DIR
57+
NAMES clBLAS.h
58+
DOC "Location of the clBLAS include directory."
59+
PATH_SUFFIXES include package/include
60+
HINTS /usr/local
61+
${CLBLAS_PACKAGE_DIR})
62+
63+
FIND_PATH(CLBLAS_LIBRARY_DIR
64+
NAMES libclBLAS${CMAKE_SHARED_LIBRARY_SUFFIX}
65+
DOC "Location of the clBLAS library"
66+
PATH_SUFFIXES lib64 package/lib64 lib64/import package/lib64/import
67+
HINTS ${CLBLAS_PACKAGE_DIR})
68+
69+
FIND_LIBRARY(_CLBLAS_LIBRARY
70+
NAMES clBLAS
71+
DOC "Library files"
72+
PATH_SUFFIXES lib lib64 package/lib64 lib64/import package/lib64/import
73+
HINTS /usr/local
74+
${CLBLAS_PACKAGE_DIR})
75+
76+
# Set up the includes and library directories
77+
SET(CLBLAS_LIBRARY ${_CLBLAS_LIBRARY})
78+
SET(CLBLAS_INCLUDE_DIRS ${_CLBLAS_INCLUDE_DIR} ${OPENCL_CL_INCLUDE_DIRS})
79+
SET(CLBLAS_LIBRARIES ${_CLBLAS_LIBRARY})
80+
SET(CLBLAS_SOURCE_DIR ${CLBLAS_SOURCE_DIR}
81+
CACHE PATH "Path for clBLAS source, if found")
82+
SET(CLBLAS_PACKAGE_DIR ${CLBLAS_PACKAGE_DIR}
83+
CACHE PATH "Path for clBLAS's packaging directory, if found")
84+
SET(CLBLAS_LIBRARY_DIR ${CLBLAS_LIBRARY_DIR}
85+
CACHE PATH "Path for clBLAS's packaging library directory, if found")
86+
87+
# handle the QUIETLY and REQUIRED arguments and set CLBLAS_FOUND to TRUE if
88+
# all listed variables are TRUE
89+
INCLUDE (FindPackageHandleStandardArgs)
90+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLBLAS DEFAULT_MSG CLBLAS_LIBRARY
91+
CLBLAS_INCLUDE_DIRS CLBLAS_LIBRARIES)
92+
MARK_AS_ADVANCED(CLBLAS_FOUND CLBLAS_PACKAGE_DIR CLBLAS_INCLUDE_DIRS
93+
CLBLAS_LIBRARY_DIR CLBLAS_LIBRARIES)

CMakeModules/FindclFFT.cmake

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# - Find clFFT, AMD's OpenCL FFT library
2+
3+
# This script defines the following variables:
4+
# CLFFT_INCLUDE_DIRS - Location of clFFT's include directory.
5+
# CLFFT_LIBRARIES - Location of clFFT's libraries
6+
# CLFFT_FOUND - True if clFFT has been located
7+
#
8+
# If your clFFT installation is not in a standard installation directory, you
9+
# may provide a hint to where it may be found. Simply set the value CLFFT_ROOT
10+
# to the directory containing 'include/clFFT.h" prior to calling this script.
11+
#
12+
# By default this script will attempt to find the 32-bit version of clFFT.
13+
# If you desire to use the 64-bit version instead, set
14+
# set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
15+
# prior to calling this script.
16+
#
17+
#=============================================================================
18+
# Copyright 2014 Brian Kloppenborg
19+
#
20+
# Licensed under the Apache License, Version 2.0 (the "License");
21+
# you may not use this file except in compliance with the License.
22+
# You may obtain a copy of the License at
23+
#
24+
# http://www.apache.org/licenses/LICENSE-2.0
25+
#
26+
# Unless required by applicable law or agreed to in writing, software
27+
# distributed under the License is distributed on an "AS IS" BASIS,
28+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29+
# See the License for the specific language governing permissions and
30+
# limitations under the License.
31+
#=============================================================================
32+
33+
IF(CLFFT_INCLUDE_DIRS)
34+
# Already in cache, be silent
35+
set (CLFFT_FIND_QUIETLY TRUE)
36+
ENDIF (CLFFT_INCLUDE_DIRS)
37+
38+
FIND_PATH(CLFFT_SOURCE_DIR
39+
NAMES src/include/clFFT.h
40+
HINTS "${CMAKE_SOURCE_DIR}/clFFT"
41+
"${CMAKE_SOURCE_DIR}/../clFFT"
42+
"${CMAKE_SOURCE_DIR}/../../clFFT"
43+
DOC "clFFT source directory.")
44+
45+
FIND_PATH(CLFFT_BUILD_DIR
46+
NAMES ./install_manifest.txt
47+
HINTS "${CLFFT_SOURCE_DIR}/build"
48+
"${CLFFT_SOURCE_DIR}/src/build"
49+
DOC "clFFT build directory.")
50+
51+
FIND_PATH(CLFFT_ROOT_DIR
52+
NAMES include/clFFT.h
53+
HINTS "$ENV{CLFFT_ROOT}"
54+
"${CMAKE_SOURCE_DIR}/.."
55+
"${CMAKE_SOURCE_DIR}/../.."
56+
"${CLFFT_BUILD_DIR}/package"
57+
"${CMAKE_INSTALL_PREFIX}"
58+
DOC "clFFT root directory.")
59+
60+
FIND_PATH(_CLFFT_INCLUDE_DIRS
61+
NAMES clFFT.h
62+
HINTS "${CLFFT_ROOT_DIR}/include"
63+
DOC "clFFT Include directory")
64+
65+
FIND_LIBRARY(_CLFFT_LIBRARY
66+
NAMES clFFT
67+
HINTS "${CLFFT_ROOT_DIR}/lib64"
68+
"${CLFFT_ROOT_DIR}/lib64/import"
69+
"${CMAKE_INSTALL_PREFIX}")
70+
71+
SET(CLFFT_INCLUDE_DIRS ${_CLFFT_INCLUDE_DIRS})
72+
SET(CLFFT_LIBRARIES ${_CLFFT_LIBRARY})
73+
74+
# handle the QUIETLY and REQUIRED arguments and set CLFFT_FOUND to TRUE if
75+
# all listed variables are TRUE
76+
INCLUDE (FindPackageHandleStandardArgs)
77+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLFFT DEFAULT_MSG CLFFT_LIBRARIES CLFFT_INCLUDE_DIRS)
78+
MARK_AS_ADVANCED(CLFFT_LIBRARIES CLFFT_INCLUDE_DIRS)

CMakeModules/build_boost_compute.cmake

Lines changed: 0 additions & 61 deletions
This file was deleted.

CMakeModules/build_clBLAS.cmake

Lines changed: 0 additions & 39 deletions
This file was deleted.

CMakeModules/build_clFFT.cmake

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)