-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
128 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
mkdir build_release | ||
cd build_release | ||
|
||
if "%ARCH%" == "64" ( | ||
set BUILD64=ON | ||
) else ( | ||
set BUILD64=OFF | ||
) | ||
|
||
cmake ^ | ||
-G "NMake Makefiles" ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^ | ||
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ | ||
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY="%LIBRARY_LIB%" ^ | ||
-DBUILD64="%BUILD64%" ^ | ||
-DSUFFIX_BIN="" ^ | ||
-DSUFFIX_LIB="" ^ | ||
-DBUILD_TEST=OFF ^ | ||
-DBUILD_KTEST=OFF ^ | ||
-DBUILD_CLIENT=OFF ^ | ||
-DOPENCL_ROOT="%LIBRARY_PREFIX%" ^ | ||
"%SRC_DIR%\src" | ||
nmake | ||
nmake install |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
mkdir build_release | ||
cd build_release | ||
|
||
|
||
OPENCL_ROOT_FLAG="-DOPENCL_ROOT=${PREFIX}" | ||
if [[ "`uname`" == "Darwin" ]] && [[ "${OSX_VARIANT}" == "native" ]] | ||
then | ||
OPENCL_ROOT_FLAG=""; | ||
fi | ||
|
||
cmake \ | ||
-G "Unix Makefiles" \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_PREFIX_PATH="${PREFIX}" \ | ||
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \ | ||
-DSUFFIX_BIN="" \ | ||
-DSUFFIX_LIB="" \ | ||
-DBUILD_TEST=0 \ | ||
-DBUILD_KTEST=0 \ | ||
-DBUILD_CLIENT=0 \ | ||
"${OPENCL_ROOT_FLAG}" \ | ||
"${SRC_DIR}/src" | ||
make | ||
make install |
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{% set name = "clRNG" %} | ||
{% set version = "1.0.0-beta" %} | ||
{% set sha256 = "12e46c89a577ea26ea8af2b11176b1c503c2b0a28a3766178f317f21f27324f4" %} | ||
|
||
{% set OSX_VARIANT = os.environ.get("OSX_VARIANT", "native") %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version.replace("-", "").replace("beta", "b") }} | ||
|
||
source: | ||
fn: {{ name }}-{{ version }}.tar.gz | ||
url: https://github.com/clMathLibraries/{{ name }}/archive/v{{ version }}.tar.gz | ||
sha256: {{ sha256 }} | ||
|
||
build: | ||
number: 0 | ||
script_env: | ||
- OSX_VARIANT | ||
|
||
{% if OSX_VARIANT != "native" %} | ||
skip: True # [not osx] | ||
{% else %} | ||
skip: True # [win and py35] | ||
{% endif %} | ||
|
||
features: | ||
{% if OSX_VARIANT == "pocl" %} | ||
- osx_pocl_opencl # [osx] | ||
{% endif %} | ||
- vc9 # [win and py27] | ||
- vc10 # [win and py34] | ||
- vc14 # [win and py35] | ||
- vc14 # [win and py36] | ||
|
||
requirements: | ||
build: | ||
- toolchain | ||
- python # [win] | ||
- cmake | ||
- ocl-icd # [linux] | ||
- khronos-opencl-icd-loader # [win] | ||
{% if OSX_VARIANT == "pocl" %} | ||
- osx-pocl-opencl # [osx] | ||
- pocl >=0.14 # [unix] | ||
{% endif %} | ||
|
||
run: | ||
- khronos-opencl-icd-loader # [win] | ||
- ocl-icd # [linux] | ||
{% if OSX_VARIANT == "pocl" %} | ||
- osx-pocl-opencl # [osx] | ||
- pocl >=0.14 # [unix] | ||
{% endif %} | ||
|
||
test: | ||
requires: | ||
- python {{ environ['PY_VER'] + '*' }} # [win] | ||
|
||
commands: | ||
# Check files | ||
- test -f "${PREFIX}/include/clRNG.h" # [unix] | ||
- test -f "${PREFIX}/lib/libclRNG.so" # [linux] | ||
- test -f "${PREFIX}/lib/libclRNG.dylib" # [osx] | ||
- if not exist %LIBRARY_INC%\\clRNG.h exit 1 # [win] | ||
- if not exist %LIBRARY_BIN%\\clRNG.dll exit 1 # [win] | ||
- if not exist %LIBRARY_LIB%\\clRNG.lib exit 1 # [win] | ||
|
||
about: | ||
home: https://github.com/clMathLibraries/{{ name }} | ||
license: BSD 3-Clause | ||
license_file: LICENSE | ||
summary: A library for uniform random number generation in OpenCL | ||
|
||
extra: | ||
recipe-maintainers: | ||
- jakirkham |