Skip to content

Commit

Permalink
Setup no install openblas/lapack on mac and only link on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesYang007 committed Apr 28, 2020
1 parent e865f11 commit 700f7b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ if [[ "$OSTYPE" == "linux-gnu" || "$OSTYPE" == "darwin"* ]]; then
cd /tmp
if [[ "$OSTYPE" == "linux-gnu" ]]; then
sudo apt install libopenblas-dev liblapack-dev
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install openblas lapack
fi
wget http://sourceforge.net/projects/arma/files/armadillo-9.870.2.tar.xz
if [ -d "armadillo-9.870.2" ]; then
Expand Down
8 changes: 6 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,14 @@ target_link_libraries(algorithm_unittest
pthread
${PROJECT_NAME}
${ARMADILLO_LIBRARIES}
lapack
blas
FastAD::FastAD
)

# Only on Linux: link with openblas and lapack
if (UNIX AND NOT APPLE)
target_link_libraries(algorithm_unittest
openblas lapack)
endif()
add_test(algorithm_unittest algorithm_unittest)

######################################################
Expand Down

0 comments on commit 700f7b4

Please sign in to comment.