Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Traditionally Unix builds are finished with a call of 'make install' which copies all relevant files from the built project you need for your everyday use to a clean place. Basically it separates all necessary files from the "garbage" which is output in the build directory. The location of the install directory is governed by the CMake cache variable CMAKE_INSTALL_PREFIX. Of course, installation is entirely optional and only takes place if you build the install target.

 

 

Generating the Makefiles with CMake

...

BOOST_ROOT
cmake optionsdocdefaultECMWFwhere to find boost ( if non-standard installation (wink) ) /usr/local/apps/boost/1.50.0 ( for the worksation)
PROJ4_PATHwhere to find proj4 ( if non-standard installation (wink) ) /usr/local/apps/proj4/4.8.0/LP64

WITH_GRIB

enable grib supportonon
GRIB_API_PATHwhere to find grib-api /usr/local/lib/metaps/lib/grib_api/1.11.0
WITH_NETCDFenable netcdf supportonon
NETCDF_PATHwhere to find netcdf  
WITH_ODBenable odb supportoffoff
ODB_API_PATHwhere to find odb 

/usr/local/apps/odb_api/0.9.28

WITH_FORTRANenable fortran supportonon
WITH_METVIEWenable metview support(and Qt support)

off

off

WITH_BUFRenable bufr supportoffoff (but if on we have to set  PGI_PATH to /usr/local/apps/pgi/pgi-10.8/linux86-64/10.8/libso)
BUFR_LIB   
WITH_PYTHONenable python supportonon
WITH_FORTRANenable fortran supportonon
WITH_METVIEWenable metview support(and Qt support)off

off

WITH_CAIROenable cairo supportonon
BOOST_ROOTwhere to find boost ( if non-standard installation (wink) ) /usr/local/apps/boost/1.50.0 ( for the worksation)
PROJ4_PATHwhere to find proj4 ( if non-standard installation (wink) ) /usr/local/apps/proj4/4.8.0/LP64
CMAKE_BUILD_TYPE

to select the type of compilation:

    • Production(-O2 -g)
    • Debug (-g)
?Debug
CMAKE_CXX_FLAGS   
CMAKE_CXX   

 

The C, C++ and Fortran compilers are chosen by CMake. (This can be overwritten by setting the variables CC, CXX and F77, on the configure command line, to the preferred compiler). Further the variable CMAKE_CXX_FLAGS can be used to set compiler flags for optimisation or debugging. For example, it is recommended to use CMAKE_CXX_FLAGS="-O2 -mtune=native" or any other optimisation to compile Magics.

...

This is a list of commands needed to install Magics. It is assumed “>” is the shell prompt. The Magics version number may vary.

       >mkdir magics

      > mkdir build

>tar -xzf Magics++-2.1422.0.tar.gz

>cd Magics++-2.14.0build

>cmake –DCMAKE_INSTALL_PREFIX. >./configure –prefix =/path/to/where/you/install/Magics++-2.1422.0

checking build system type... i686-suse-linux

...

> setenv MAGPLUS_HOME /path/to/where/you/install/Magics++-2.1422.0

> make check                                                          << running the test programs

...