Skip to content

Commit 145c9e6

Browse files
committed
GRIDEDIT-1926 install OpenMP
1 parent c4720f2 commit 145c9e6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/build-and-test-workflow.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ jobs:
4343
elif [ "${{ runner.os }}" == "Linux" ]; then
4444
sudo apt-get install libboost-all-dev doxygen
4545
fi
46+
47+
# Step: Install OpenMP
48+
- name: Install OpenMP
49+
run: brew install libomp
50+
51+
# Step: Set OpenMP environment variables
52+
- name: Set OpenMP environment variables
53+
run: |
54+
echo "LDFLAGS=-L/opt/homebrew/opt/libomp/lib" >> $GITHUB_ENV
55+
echo "CPPFLAGS=-I/opt/homebrew/opt/libomp/include" >> $GITHUB_ENV
4656
4757
# Step: Restore cached user-provided dependencies
4858
- name: Restore cached user-provided dependencies
@@ -92,6 +102,9 @@ jobs:
92102
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }}
93103
-DCMAKE_PREFIX_PATH=${{ steps.paths.outputs.ext_deps_dir }}/netcdf-c/install/netcdf-c
94104
-DCMAKE_INSTALL_PREFIX=${{ steps.paths.outputs.install_dir }}
105+
-DCMAKE_C_FLAGS="-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include"
106+
-DCMAKE_CXX_FLAGS="-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include"
107+
-DCMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/opt/libomp/lib -lomp"
95108
96109
# Step: CMake build
97110
- name: Build

0 commit comments

Comments
 (0)