Building SpecMiCP ----------------- SpecMiCP uses CMake[1] as build system, to build it, in the specmicp directory, run : cmake . make To customize build, see the cmake documentation[2] and the following informations : Requirements : ============== - C++11 compiler (tested with gcc 4.8.3 and 4,9.2 and clang 3.6.0) - Boost [3] (tested with boost 1.55 and higher) - Eigen [4] (>=3.2) Requirements for the documentation : ------------------------------------ - Doxygen[5] The tests require Catch[6] but it is downloaded automatically by Cmake in the project directory if needed. Configuration Options : ======================= These options are used by CMake to configure the project - SPECMICP_NO_DEBUG - bool (default OFF) - if true, remove assert used in specmicp - SPECMICP_USE_OPENMP : - bool (default ON) - use OpenMP to parallelize code - SPECMICP_DEBUG_EQUATION_FD_JACOBIAN - bool (default OFF) - use a finite difference jacobian in specmicp - SPECMICP_BUILD_STATIC - bool (default OFF) - if ON, also build static libraries - SPECMICP_BUILD_EXAMPLE - bool (default ON) - if ON, build the examples - SPECMICP_LTO - bool (default OFF) - if ON, use Link-time optimization if available - SPECMICP_LD_GOLD - bool (default ON) - if ON, use the Gold linker [7] if available - SPECMICP_PROFILE_GENERATE - bool (default OFF) - if ON, generate the profiles for profile guided optimization - SPECMICP_PROFILE_USE - bool (default OFF) - if ON, use the profiles to better optimimize the programs The libs must have been compiled with -DSPECMICP_PROFILE_GENERATE=ON before, and trained. See scripts/pgo_sequence.sh Examples of configuration : mkdir build; cd build cmake .. -DSPECMICP_USE_OPENMP=ON -DCMAKE_C_COMPILER=[C compiler] -DCMAKE_CXX_COMPILER=[C++11 compiler] -DCMAKE_BUILD_TYPE=Release Other example : to install specmicp in '/opt/local' mkdir build cd build cmake .. -DSPECMICP_BUILD_EXAMPLE=ON -DPYTHON_VERSION_3=OFF -DSPECMICP_USE_OPENMP=ON -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_BUILD_TYPE=release make && make doc_html make install For a custom version of eigen 3: -DEIGEN3_INCLUDE_DIR=[eigen3 directory] For a custom version of boost : -DBoost_NO_BOOST_CMAKE=true -DBOOSTROOT=[boost directory] Tests ===== The tests can be executed with through the ctest command ctest [--output-on-failure] ctest is part of the cmake framework. The commands `make check` and `make test` will also work. [1]: http://www.cmake.org/ [2]: http://www.cmake.org/cmake/help/v3.0/ [3]: http://www.boost.org/ [4]: http://eigen.tuxfamily.org/ [5]: http://www.stack.nl/~dimitri/doxygen/ [6]: https://github.com/philsquared/Catch [7]: https://en.wikipedia.org/wiki/Gold_%28linker%29