Skip to content

Commit 56ae981

Browse files
committed
Update the readme with update build instructions for osx and windows
1 parent db35698 commit 56ae981

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ This will create the `libapr.so` library in the `build` directory.
9999

100100
On OSX, install the `cmake`, `hdf5` and `libtiff` [homebrew](https://brew.sh) packages and have the [Xcode command line tools](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/) installed.
101101

102-
If you want to compile with OpenMP support, also install the `llvm` package (this can also be done using homebrew), as the clang version shipped by Apple currently does not support OpenMP.
102+
If you want to compile with OpenMP support (Recommended), also install the `llvm` and `libomp` package via homebrew as the clang version shipped by Apple currently does not support OpenMP.
103103

104104
In the directory of the cloned repository, run
105105

@@ -110,15 +110,6 @@ cmake ..
110110
make
111111
```
112112

113-
This will create the `libapr.dylib` library in the `build` directory.
114-
115-
116-
In case you want to use the homebrew-installed clang (OpenMP support), modify the call to `cmake` above to
117-
118-
```
119-
CC="/usr/local/opt/llvm/bin/clang" CXX="/usr/local/opt/llvm/bin/clang++" LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" CPPFLAGS="-I/usr/local/opt/llvm/include" cmake ..
120-
```
121-
122113
### Building on Windows
123114

124115
On windows there are two working strategies we have tested. Either cheating and using WSL2 and linux above, or utilising a recent version clang-cl or clang directly as included in MSVC 2019 >16.8.6. Note for earlier versions OpenMP support did not work.
@@ -139,6 +130,7 @@ choco install -y cmake.portable
139130
install the required visual studio compiler tools and clang: (Note you can also do this via downloading 2019 community and selecting the correct packages)
140131
```
141132
choco install visualstudio2019buildtools --params "--add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools"
133+
choco install -y llvm
142134
```
143135
Now install your dependencies using vcpkg, in an install directory (VCPKG_PATH) of your choice do the following:
144136
```
@@ -147,7 +139,7 @@ cd vcpkg
147139
./bootstrap-vcpkg.bat
148140
./vcpkg.exe install blosc:x64-windows gtest:x64-windows tiff:x64-windows hdf5:x64-windows szip:x64-windows
149141
```
150-
Now navigate to your cloned LibAPR directory (git clone --recursive https://github.com/AdaptiveParticles/LibAPR.git) and use vcpkg to install the required dependencies. You should have all dependencies set up to be able to build the library with clang-cl -A x64 -T ClangCL and to search for dependencies from vcpkg at your vcpkg install location: -DCMAKE_TOOLCHAIN_FILE="VCPKG_PATH/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows .
142+
Now navigate to your cloned LibAPR directory (git clone --recursive https://github.com/AdaptiveParticles/LibAPR.git). You should have all dependencies set up to be able to build the library with clang-cl `-A x64 -T ClangCL` and to search for dependencies from vcpkg at your vcpkg install location: `-DCMAKE_TOOLCHAIN_FILE="VCPKG_PATH/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows` .
151143

152144
Now for example to build the tests and examples (Please note you will need to update below with your own VCPKG_PATH from the steps above.
153145
```

0 commit comments

Comments
 (0)