grep -E "OPTION.*(Modular|Static)" CMakeLists.txt
cmake -DBUNDLE_EIGEN=ON -DBUNDLE_JSON=ON
mkdir build-debug cd build-debug cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON -DTRACE_MEMORY_ALLOCS=OFF -DPythonModular=ON -DBUILD_DASHBOARD_REPORTS=ON -DCMAKE_INSTALL_PREFIX="$BUILDDIR/install" ..
cmake -DSWIG_EXECUTABLE=/usr/bin/swig2.0
mkdir build-release cd build-release cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=ON -DCMAKE_INSTALL_PREFIX="$BUILDDIR/install" ..
make -j GoogleMock # only needed on first build: fetch and compile GoogleMock make -j all # compiling everything make -j install # install required for "make test" make -j test # compile and run all tests and examples
make -j shogun # only compiling libshogun make -j shogun-unit-test # build unit test binary make -j unit-tests # build and run unit tests
ctest -D ExperimentalMemCheck # runs all tests with valgrind (depends on -DBUILD_DASHBOARD_REPORTS=ON) cd tests/unit && valgrind --leak-check=full ./shogun-unit-test --gtest_filter=EPInferenceMethod.get_cholesky_probit_likelihood cd tests/unit && valgrind --leak-check=full ./shogun-unit-test --gtest_filter=EPInferenceMethod.*
specify a different compiler (from CMake FAQ http://www.cmake.org/Wiki/CMake_FAQ "How do I use a different compiler?")
CC=/path/to/gcc CXX=/path/to/g++ cmake ..
Under osx one often has the same python major versions installed in /usr and /usr/local via brew etc so one might observe crashes
cmake -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Headers -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib -DPythonModular=ON ..
or in general cmake -DPYTHON_INCLUDE_DIR=/path/to/python/include/dir -DPYTHON_LIBRARY=path/to/python/libpythonVERSION.so ..