Skip to content

Commit

Permalink
add macos build
Browse files Browse the repository at this point in the history
macos build

macos build
  • Loading branch information
shijiashuai committed Jan 1, 2020
1 parent fec24c2 commit 943a098
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ jobs:
- BUILD_TAG=-cpu
before_deploy:
- ./scripts/build_cpu_wheel.sh
- name: macos-cpu
os: osx
language: bash
env:
- BUILD_TAG=-cpu
before_deploy:
- ./scripts/build_cpu_wheel.sh
script:
- ./scripts/build_cputest.sh
deploy:
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def finalize_options(self):
if not path.exists(path.join(dirname, "thundersvm", path.basename(lib_path))):
copyfile(lib_path, path.join(dirname, "thundersvm", path.basename(lib_path)))

build_tag = os.environ.get['BUILD_TAG', '']
build_tag = os.environ.get('BUILD_TAG', '')
setuptools.setup(name="thundersvm" + build_tag,
version="0.3.4",
packages=["thundersvm"],
Expand Down
10 changes: 10 additions & 0 deletions scripts/build_cpu_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ linux)
cmake -DUSE_CUDA=OFF -DUSE_EIGEN=ON ..
;;
osx)
brew install cmake libomp
cmake \
-DUSE_CUDA=OFF \
-DUSE_EIGEN=ON \
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" \
-DOpenMP_C_LIB_NAMES=omp \
-DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" \
-DOpenMP_CXX_LIB_NAMES=omp \
-DOpenMP_omp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib \
..
;;
windows)
export PATH=${MSBUILD_PATH}:$PATH
Expand Down
11 changes: 11 additions & 0 deletions scripts/build_cputest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ linux)
cmake -DBUILD_TESTS=ON -DUSE_CUDA=OFF -DUSE_EIGEN=ON ..
;;
osx)
brew install cmake libomp
cmake \
-DUSE_CUDA=OFF \
-DUSE_EIGEN=ON \
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" \
-DOpenMP_C_LIB_NAMES=omp \
-DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" \
-DOpenMP_CXX_LIB_NAMES=omp \
-DOpenMP_omp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib \
-DBUILD_TESTS=ON \
..
;;
windows)
export PATH=${MSBUILD_PATH}:$PATH
Expand Down

0 comments on commit 943a098

Please sign in to comment.