Skip to content

Commit

Permalink
Update macOS docs and CI script to use LIBOMP_PREFIX for OpenMP libra…
Browse files Browse the repository at this point in the history
…ry path
  • Loading branch information
SRSaunders committed Apr 27, 2024
1 parent ca8e6fe commit 4fbd13a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ jobs:
cd ~/VulkanSDK/latest
sudo python ./install_vulkan.py
brew install libomp
brew --prefix libomp
- name: Build
run: |
cmake -G "Xcode" -DOpenMP_omp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib .
export LIBOMP_PREFIX=$(brew --prefix libomp)
cmake -G "Xcode" -DOpenMP_omp_LIBRARY=$LIBOMP_PREFIX/lib/libomp.dylib .
cmake --build .
build_iOS:
Expand Down
10 changes: 4 additions & 6 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,13 @@ Open **vulkan_sdk.dmg** and install the Vulkan SDK with *System Global Installat
Install **libomp** from [homebrew](https://brew.sh) using:
```brew install libomp```

Find the **libomp** path prefix using:
```brew --prefix libomp```

Use the **libomp** path prefix to adjust the path for ```-DOpenMP_omp_LIBRARY=``` in the cmake command below.
Define the **libomp** path prefix using:
```export LIBOMP_PREFIX=$(brew --prefix libomp)```

Use [CMake](https://cmake.org) to generate a build configuration for Xcode or your preferred build method (e.g. Unix Makefiles or Ninja).

Example of cmake generating for Xcode with **libomp** path defined for homebrew on Apple Silicon:
```cmake -G "Xcode" -DOpenMP_omp_LIBRARY=/opt/homebrew/opt/libomp/lib/libomp.dylib```
Example of cmake generating for Xcode with **libomp** library path defined:
```cmake -G "Xcode" -DOpenMP_omp_LIBRARY=$LIBOMP_PREFIX/lib/libomp.dylib .```

####iOS
Navigate to the [apple](apple/) folder and follow the instructions in [README\_MoltenVK_Examples.md](apple/README_MoltenVK_Examples.md)

0 comments on commit 4fbd13a

Please sign in to comment.