From fecff8ded735d309aba43d30226c0bb51386c905 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 23 Jan 2020 07:17:36 +0000 Subject: working osx build (#491) * working osx build * correct omp lib name * add cache parameter closes #470 --- recipe/build.sh | 19 +++++++++++++++++-- recipe/meta.yaml | 4 +++- 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'recipe') diff --git a/recipe/build.sh b/recipe/build.sh index 22cfae8..3ac547e 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -14,11 +14,26 @@ mkdir ${SRC_DIR}/build_framework #cp -r "${RECIPE_DIR}/../" ${SRC_DIR}/build_framework cd ${SRC_DIR}/build_framework -cmake ${RECIPE_DIR}/../ -DCONDA_BUILD=ON \ + +if [ `python -c "from __future__ import print_function; import platform; print (platform.system())"` == "Darwin" ] ; +then + echo "Darwin"; + cmake ${RECIPE_DIR}/../ -DCONDA_BUILD=ON \ + -DCMAKE_BUILD_TYPE="Release"\ + -DLIBRARY_LIB=$CONDA_PREFIX/lib \ + -DLIBRARY_INC=$CONDA_PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX\ + -DOPENMP_INCLUDES=${CONDA_PREFIX}/include \ + -DOPENMP_LIBRARIES=${CONDA_PREFIX}/lib +else + echo "something else"; + + cmake ${RECIPE_DIR}/../ -DCONDA_BUILD=ON \ -DCMAKE_BUILD_TYPE="Release"\ -DLIBRARY_LIB=$CONDA_PREFIX/lib \ -DLIBRARY_INC=$CONDA_PREFIX \ -DCMAKE_INSTALL_PREFIX=$PREFIX -make install +fi +make install VERBOSE=1 # $PYTHON setup.py install diff --git a/recipe/meta.yaml b/recipe/meta.yaml index fee8e87..4fe7150 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -28,6 +28,7 @@ requirements: - python - setuptools - cmake + - openmp # [osx] run: - {{ pin_compatible('numpy', max_pin='x.x') }} @@ -37,7 +38,8 @@ requirements: - matplotlib - h5py - pillow - - libgcc-ng # [not win] + - libgcc-ng # [linux] + - openmp # [osx] about: home: http://www.ccpi.ac.uk -- cgit v1.2.3