CMake

From wiki
Revision as of 10:59, 9 June 2016 by Rf (talk | contribs)
Jump to: navigation, search

Introduction

Cmake is a compilation configuration platform which promises cross platform portability. I.e. it is apparently able to compile for Linux, MacOSX and Windows.

As touched on above, cmake just sets up configuration. The normal, everyday make command will need to be run afterwards.

Tips

  • cmake's standard configuration file is called CMakeLists.txt
  • cmake will also need to knwo which directory the main CMakeLists.txt file is.
  • non-standard library locations: cmake has problems with this, especially boost.
  • You need to make sure the BOOST_ROOT directory is set, and then seemingly skip cmakes's internal seetings for boosts .. which unsurprisingly will not be the non-standard ones.
cmake -DBoost_NO_BOOST_CMAKE=TRUE .

Specific problems

= Installing Jui Hung Hung's PEAT

  • Non standard location and new (v 1.61.0) Boost installation
  • Tried above tip, and even its longer version, but a weird library error appears
cmake -DCMAKE_INSTALL_PREFIX=$TARGET -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT:PATHNAME=$BOOST_ROOT - Boost_LIBRARY_DIRS:FILEPATH=${BOOST_ROOT}/lib