If you are compiling on a Mac you have a couple of options.

Using XCode

If you want to use the standard XCode build tools, Lemma will compile as long as you do not attempt to use OpenMP. This is due to OpenMP not being included in Apple's Clang compiler. If you elect to go this route, simply install XCode, and then within XCode make sure you have the command line tools installed. Some people have reported being able to build CMake projects using an external libomp , however, in High Sierra we have have not been able to accomplish this due to CMake still not linking correctly. This will hopefully be possible soon. If you have discovered a workaround, please report it to us.

Using HomeBrew

The current recommended route is to install a compiler which includes OpenMP support. The easiest way to do this is to install a current llvm/clang toolchain using HomeBrew.

# Install HomeBrew (if necessary) 
/usr/bin/ruby -e "$(curl -fsSL"  
# make sure HomeBrew is up to date 
brew update 
brew upgrade
# install omp and the latest llvm 
brew install libomp 
brew install llvm  
brew install cmake 

If you see errors like this

/usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found

It is due to changes in where XCode is placing system libraries. This can be easily remedied.

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

If you would like to install optional dependencies, note that installing vtk will automatically install boost

brew install vtk 
brew install boost 

At this point you can invoke cmake, but you need to specify the CMAKE_CXX_COMPILER and CMAKE_C_COMPILER to be the variants installed above.

  git clone 
  ccmake ../Lemma

At this point, you can specify the compilers within the Advanced settings by hitting t CmakeMacOSX Once the compilers are specified, you can type c to configure and g to generate the Makefile.

# start with the initial dependencies 
ccmake ../Lemma # configure the main build 
make install 
Last modified 20 months ago Last modified on Apr 26, 2019 2:22:20 PM

Attachments (1)

Download all attachments as: .zip