cmakethen using it to compile DIET should provide no surprise. DIET respects
cmake's best practices e.g., by clearly separating the source tree from the binary tree (or compile tree), by exposing the main configuration optional flag variables prefixed with
DIET_(and by hiding away the technical variables) and by not postponing configuration difficulties (in particular the handling of external dependencies like libraries) to compile stage.
cmake classically provides two ways for setting configuration
parameters in order to generate the makefiles in the form of two
cmake (the first one has an extra
ccmake [options] <path-to-source>
cmake [options] <path-to-source> [-D<var>:<type>=<value>]
-Dflag directly from the command line.
<path-to-source>specifies a path to the top level of the source tree (i.e., the directory where the top level CMakeLists.txt file is to be encountered). Also the current working directory will be used as the root of the build tree for the project (out of source building is generally encouraged especially when working on a CVS tree).
Here is a short list of
cmake internal parameters that are worth
CMAKE_BUILD_TYPEcontrols the type of build mode among which
Debugwill produce binaries and libraries with the debugging information
CMAKE_VERBOSE_MAKEFILEis a Boolean parameter which when set to ON will generate makefiles without the .SILENT directive. This is useful for watching the invoked commands and their arguments in case things go wrong.
CMAKE_C[XX]_FLAGS*is a family of parameters used for the setting and the customization of various C/C++ compiler options.
CMAKE_INSTALL_PREFIXvariable defines the location of the install directory (defaulted to
/usr/localon Un*x). This is cmake's portable equivalent of the autotools configure's -prefix= option.
ccmake's most pertinent options (corresponding keyboard shortcuts) depending on your current context
ccmakeembedded tutorial and a list of keyboard shortcuts (as mentioned in the bottom lines, hit "e" to exit)
enterto edit path variables
PATHtyped parameter the
TABkeyboard shortcut provides an emacs-like (or bash-like) automatic path completion.