force usage brew llvm and omp on macos

This commit is contained in:
alemuntoni 2022-10-27 14:12:59 +02:00
parent e324c16155
commit 0c760bcefe
2 changed files with 17 additions and 2 deletions

View File

@ -20,7 +20,7 @@ jobs:
submodules: recursive
- name: Install dependencies
run: |
brew install libomp cgal xerces-c
brew install llvm libomp cgal xerces-c
npm install -g appdmg
- name: Cache Qt
id: cache-qt
@ -45,7 +45,7 @@ jobs:
- name: Configure and Build
shell: bash
run: |
bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} --nightly
bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} --nightly --use_brew_llvm
- name: Deploy
shell: bash
run: |

View File

@ -20,6 +20,7 @@ INSTALL_PATH=$SOURCE_PATH/../install
CORES="-j4"
DOUBLE_PRECISION_OPTION=""
NIGHTLY_OPTION=""
USE_BREW_LLVM=false
QT_DIR=""
#check parameters
@ -50,6 +51,10 @@ case $i in
QT_DIR=${i#*=}
shift # past argument=value
;;
--use_brew_llvm)
USE_BREW_LLVM=true
shift # past argument=value
;;
*)
# unknown option
;;
@ -68,6 +73,16 @@ then
mkdir -p $INSTALL_PATH
fi
if [ "$USE_BREW_LLVM" = true ] ; then
export PATH="$(brew --prefix llvm)/bin:$PATH";
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
export COMPILER=${CXX}
export CFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include"
export CXXFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include"
export LDFLAGS="-L /usr/local/lib -L/usr/local/opt/llvm/lib"
fi
cd $BUILD_PATH
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $SOURCE_PATH
make $CORES