-
Notifications
You must be signed in to change notification settings - Fork 78
Building libcmaes on Mac OSX
Emmanuel Benazera edited this page Aug 8, 2014
·
21 revisions
Instructions for compiling on OSX Maverick (10.9) [untested on other versions] with Mac Ports. Similar instructions should work for Homebrew users as well:
- install macports and export PATH:
export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/local/git/bin
- install gcc-47 or higher (gcc-48, gcc-49) from macports
sudo port install gcc48
sudo port install autoconf
sudo port install automake
- install eigen3 from macports
sudo port install eigen3
- install gflags from macports:
sudo port install gflags +gcc48
- get libcmaes from github:
git clone https://github.com/beniz/libcmaes.git
- configure libcmaes:
./autogen.sh
./configure CC=/opt/local/bin/gcc CXX=/opt/local/bin/g++ --with-eigen3-include=/opt/local/include/eigen3 CXXFLAGS="-lstdc++ -I/opt/local/include -O4" LDADD=-lgflags LDFLAGS=-L/opt/local/lib
- build libcmaes
make
- test libcmaes
./tests/test_functions
should return results of a run on fsphere in 2-D.
./configure CC=/opt/local/bin/gcc CXX=/opt/local/bin/g++ --with-eigen3-include=/opt/local/include/eigen3 CXXFLAGS=-lstdc++ -I/opt/local/include -I/Users/benazera/include -O4 -I/opt/local/include/ LDADD=-lgflags LDFLAGS=-L/opt/local/lib -L/Users/benazera/lib BOOST_LDFLAGS=-L/opt/local/lib --enable-python