Skip to content
Browse files

Updated Windows readme with complete build script.

  • Loading branch information
elhigu committed Jan 27, 2015
1 parent 4ed7125 commit 8e8c53a83e73996ae2bada043486a5f18f4de3c0
Showing with 59 additions and 33 deletions.
  1. +15 −33 README.Windows
  2. +44 −0 windows/
@@ -2,12 +2,13 @@

## Dependencies:

- Visual Studio Express 2013
- Visual Studio 2013
- Git and Git bash
- CMake 2.8
- CMake 2.8 or newer
- Python 2.7 for LLVM
- Pthreads-win32 binary distribution
- Hwloc for Windows x64 binary distribution
- LLVM + Clang 3.5 sources
- LLVM + Clang latest release sources

## Support:

@@ -16,39 +17,20 @@
- No VML (no stdcxxlib finding done for windows)
- Static compilation

## Install and compile LLVM and Clang somewhere in path without spaces in directory name
## Building

In git bash
There is shell script in `pocl/windows/`

mkdir /c/opt/
cd /c/opt
git clone llvm
cd tools
git clone clang
mkdir /c/opt/build-llvm
cd /c/opt/build-llvm
cmake -G "Visual Studio 12 Win64" ../llvm -DPREFIX
Shell script may be ran in `Git Bash` and it downloads and installs pocl and all the
library dependencies and builds them to `/c/pocl-playground`.

## Unpack library dependencies
To download and build everything without first fetching pocl repository one can do simply:

cd /c/opt/
curl ...
curl ...
unzip hwloc
unzip pthreads-win32
curl | sh

## Get pocl sources and compile

cd /c/opt
git clone pocl
mkdir /c/opt/build-pocl
cd /c/opt/build-pocl
export PATH=$PATH:/c/opt/llvm-build/MinSizeRel/bin
Hwloc_ROOT=../hwloc-win64-build-1.9/ Pthreads_ROOT=../pthreads-win32/ cmake —DSTATIC_LLVM=ON -DDEFAULT_ENABLE_ICD=OFF -DCMAKE_INSTALL_PREFIX:PATH=$PWD/../install-pocl -G "Visual Studio 12 Win64" ../pocl/
# open generated solution file in Visual Studio or build from command line

## Run test suite

cd /c/opt/build-pocl
ctest -j8
Script requires following software installed on Windows 7 or later (64bit only):

- Visual Studio 2013 (e.g. community edition)
- Cmake 2.8 or later (must be added to PATH)
- Git + Git Bash
- Python 2.7 for compiling LLVM
@@ -0,0 +1,44 @@

# This script requires following software preinstalled:
# * Git + git bash (default installer settings are fine)
# * Python 2.7
# * Cmake 2.8 or later (make sure it will be added to PATH during installation)
# * Visual Studio Community edition 2013

# no spaces in this path please
export POCLBUILDROOT=/c/pocl-playground


# Get external libs
curl -O
curl -O
unzip -d pthreads-win32-full
cp -r pthreads-win32-full/Pre-built.2 pthreads-win32

# Build llvm
git clone --single-branch -b release_36
cd llvm/tools
git clone --single-branch -b release_36
mkdir $POCLBUILDROOT/llvm-build
cd $POCLBUILDROOT/llvm-build
cmake -G "Visual Studio 12 Win64" ../llvm
cmake --build . --config MinSizeRel

# Build pocl
git clone
mkdir $POCLBUILDROOT/pocl-build
cd $POCLBUILDROOT/pocl-build
export PATH=$PATH:$POCLBUILDROOT/llvm-build/MinSizeRel/bin
Hwloc_ROOT=../hwloc-win64-build-1.10.0/ Pthreads_ROOT=../pthreads-win32/ cmake -DSTATIC_LLVM:BOOL=ON -DDEFAULT_ENABLE_ICD:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=$PWD/../install-pocl -G "Visual Studio 12 Win64" ../pocl/
cmake --build . --config MinSizeRel

## Run test suite
# export PATH=$PATH:$POCLBUILDROOT/pocl-build/lib/CL/MinSizeRel:$POCLBUILDROOT/pocl-build/lib/llvmopencl/MinSizeRel:$POCLBUILDROOT/pocl-build/lib/poclu/MinSizeRel:$POCLBUILDROOT/hwloc-win64-build-1.10.0/bin:$POCLBUILDROOT/pthreads-win32/dll/x64
# cd $POCLBUILDROOT/pocl-build
# ctest -j8

0 comments on commit 8e8c53a

Please sign in to comment.
You can’t perform that action at this time.