Versions Compared

Key

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

...

Code Block
languagebash
titleSteps to configure grib-api with CMake assuming gnu compilers
mkdir bld
mkdir grib-api
cd bld
export CC=gcc
export FC=gfortran
cmake ../grib_api-1.14.0-Source   \
      -DCMAKE_BUILD_TYPE=Bit          \
      -DCMAKE_INSTALL_PREFIX="../grib-api"   \
      -DENABLE_NETCDF=ON              \
      -DENABLE_JPG=OFF                \
      -DENABLE_PNG=OFF                \
      -DENABLE_PYTHON=ON              \
      -DENABLE_FORTRAN=ON             \
      -DENABLE_GRIB_THREADS=ON

...

ReleaseRelease mode - the binary package does not include debug symbols and some of the source code is ignored; this mode is the default for users.
DebugDebug mode - the binary package includes debug symbols in the source code are not ignored; this mode is the default for developers and typically uses low or no optimisation.
RelWithDebInfoRelease mode, but the binary package includes debug symbols this mode is for developers and users and is often the default build type.BitBit-reproducibility mode - This is non-standard and will not be found on other cmake enabled packages. It is used at ECMWF to set compiler options that have been tested to provide bit-reproducibility.

Available options

To get additional help on the available options (similar to the 'configure --help' command) run the command:

...

Info
titleSeeing command output with cmake

If using cmake, it will normally hide all the output from the compile commands. If you want to see the compile command (to check the compile options), do:

make VERBOSE=1

...