Skip to content

Commit

Permalink
Fixdependencies (#11)
Browse files Browse the repository at this point in the history
* add libcblas and libblas to meta.yaml

* recompile libcf with new libblas and libcblas

* change compiler to clang

* add CFLAGS for osx64 in build

* fix CPPFLAGS and CFLAGS for clang
  • Loading branch information
dnadeau4 authored Jul 5, 2019
1 parent 2757b00 commit ddd614b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
environment:
WORKDIR: "test_macos_libcf_py2"
PY_VER: "py2"
CONDA_COMPILER: "gcc"
CONDA_COMPILER: "clang_osx-64"
steps:
- checkout
- run: *setup_miniconda
Expand All @@ -125,7 +125,7 @@ jobs:
environment:
WORKDIR: "test_macos_libcf_py3"
PY_VER: "py3"
CONDA_COMPILER: "gcc"
CONDA_COMPILER: "clang_osx-64"
steps:
- checkout
- run: *setup_miniconda
Expand Down
6 changes: 3 additions & 3 deletions cf_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

/* Define to a macro mangling the given C identifier (in lower and upper
case), which must not contain underscores, for linking with Fortran. */
/* #undef FC_FUNC */
#define FC_FUNC(name,NAME) name ## _

/* As FC_FUNC, but for C identifiers containing underscores. */
/* #undef FC_FUNC_ */
#define FC_FUNC_(name,NAME) name ## _

/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
Expand Down Expand Up @@ -70,7 +70,7 @@
#define HAVE_STRING_H 1

/* Define this if you have strlcat() */
/* #undef HAVE_STRLCAT */
#define HAVE_STRLCAT 1

/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
Expand Down
9 changes: 7 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#source activate "${CONDA_DEFAULT_ENV}"
export CFLAGS="-Wall -m64 -pipe -O2 -fPIC ${CFLAGS}"
export CFLAGS="-Wall -m64 -pipe -O2 -fPIC -I${PREFIX}/include ${CFLAGS}"
export CXXFLAGS="${CFLAGS} ${CXXFLAGS}"
export CPPFLAGS="-I${PREFIX}/include ${CPPFLAGS}"
export LDFLAGS="-L${PREFIX}/lib ${LDFLAGS}"
export LFLAGS="-fPIC ${LFLAGS}"
export FC=""
# needed for clang_osx-64
if [ ${HOME} == "/Users/distiller" ]; then
export CFLAGS="-Wl,-syslibroot / -isysroot / ${CFLAGS}"
# configure need this otherwise "error.h" is not found and configure report netcdf.h
export CPPFLAGS="-Wl,-syslibroot / -isysroot / -I${PREFIX}/include ${CPPFLAGS}"
fi
./configure --prefix=${PREFIX}
make
make install
Expand Down
2 changes: 2 additions & 0 deletions recipe/meta.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ requirements:
- curl >=7.44.0,<8
- python
- libuuid
- libblas
- libcblas

test:
imports:
Expand Down

0 comments on commit ddd614b

Please sign in to comment.