-
Notifications
You must be signed in to change notification settings - Fork 35
Multi OS Building Instructions
gcielniak edited this page Feb 9, 2019
·
6 revisions
To build the tutorials you will first need to setup your environment - see instructions below for your OS. In addition to your compiler, you will need: Git, CMake, OpenCL and Boost.
When the environment is ready, follow these instructions:
- clone repository
git clone https://github.com/gcielniak/OpenCL-Tutorials.git
- change the branch to multi_os
git checkout multi_os
- build:
mkdir build & cd build
,cmake ..
,make
Each tutorial has a separate directory with executables, kernels and other files.
Tested on Windows 10.
-
Tools
- You will need to download and install Visual Studio, Git and CMake.
-
OpenCL
- Intel SDK for OpenCL Applications. You will need to register to be able to download the file.
-
Boost
- download the latest Windows binaries and install to the default directory (e.g.
C:\local
). You will need to choose the right version for your VS: e.g.boost_1_69_0-msvc-14.1-64.exe
for VS2017. - add environmental variables so that CMake can locate your Boost installation:
setx BOOST_INCLUDEDIR C:\local\boost_1_69_0
andsetx BOOST_LIBRARYDIR C:\local\boost_1_69_0\lib64-msvc-14.1
. This will need to be modified if you use a different version of Boost or VS.
- download the latest Windows binaries and install to the default directory (e.g.
Tested on a mint Ubuntu 16.04, desktop version.
-
Tools
- install Git and CMake:
sudo apt-get install git cmake
- install Git and CMake:
-
OpenCL
- install development files:
sudo apt-get install ocl-icd-opencl-dev
- install development files:
-
Boost
- install a Boost version containing the Compute library (has to be >= 1.61)
- download sources:
wget -O boost_1_69_0.tar.gz https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz
- unpack
tar xzvf boost_1_69_0.tar.gz
- build
cd boost_1_69_0
,./bootstrap.sh --prefix=/usr/local
and./b2
. You can use./b2 -j number_of_cores
for faster compilation. - and install
sudo ./b2 install
- download sources:
- add environmental variables so that CMake can locate your new Boost installation:
BOOST_INCLUDEDIR=/usr/local/include
,BOOST_LIBRARYDIR=/usr/local/lib
.
- install a Boost version containing the Compute library (has to be >= 1.61)
Tested on OS X El Captain. OpenCL is already installed on macOS.
-
Tools
- install Homebrew package manager:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
. More info on what Homebrew is. - install Git and CMake using Hombebrew :
brew install git cmake
- install Homebrew package manager:
-
Boost
- install Boost using Homebrew:
brew install boost
- install Boost using Homebrew: