Created
June 2, 2020 09:09
-
-
Save SiccarPoint/f6783361385d0d4665c78835a3ed4317 to your computer and use it in GitHub Desktop.
This is a schematic script to enable cmake compilation with late versions of Xcode on a Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a schematic script to enable cmake compilation with late versions of Xcode on a Mac | |
# This is the first problem: https://www.anaconda.com/blog/utilizing-the-new-compilers-in-anaconda-distribution-5 | |
# Other routes may be possible... | |
# We appear to need libomp and llvm alongside cmake, so | |
brew install cmake libomp llvm | |
# 1. Grab MacOSX10.9.sdk from https://github.com/phracker/MacOSX-SDKs and stick it in /opt/MacOSX10.9.sdk | |
# 2. Point the cmake compiler at this SDK | |
export CONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk | |
# 3. Perform the cmake call as specified in whatever install instructions, e.g. for https://github.com/r-barnes/Barnes2020-FillSpillMerge | |
cmake -D CMAKE_C_COMPILER="/usr/local/Cellar/llvm/10.0.0_3/bin/clang" -D CMAKE_CXX_COMPILER="/usr/local/Cellar/llvm/10.0.0_3/bin/clang++" -DCMAKE_BUILD_TYPE=Release .. | |
# be sure to repoint the versioning in the links as necessary | |
# finish the build, e.g. | |
make -j 4 # 4 cores |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment