Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update CMAKE options

...

 

CMAKE_INSTALL_PREFIXwhere you want to install your ODB API/usr/local
CMAKE_BUILD_TYPE

to select the type of compilation:

  • Debug
  • RelWithDebInfo
  • Release
  • Production
RelWithDebInfo
BUILD_SHARED_LIBSSelect the type of library built:
  • ON (Build shared libraries only)
  • OFF (Build static libraries only)
  • BOTH (Build both shared and static libraries)
ON
CMAKE_CXX_COMPILERC++ compiler 
CMAKE_CXX_FLAGSFlags for the C++ compiler 
CMAKE_C_COMPILERC Compilercompiler 
CMAKE_C_FLAGSFlags for the C Compilercompiler 
CMAKE_Fortran_COMPILERFortran Compilercompiler 
CMAKE_Fortran_FLAGSFlags for the Fortran Compilercompiler 
ENABLE_NETCDFFor the grib_to_netcdf convert Build odb2netcdf toolAUTO
ENABLE_PYTHONOffers the Build Python interface to the packagefor ODB APIAUTO
ENABLE_FORTRANOffers the Fortran interface to the packageBuild Fortran interface for ODB APIAUTO
ENABLE_MIGRATORBuild odb_migrator tool for importing legacy ODB databases 
ODB_SOURCEDirectory with source of the legacy ODB software 
ODB_PATHPath to legacy ODB installation AUTO
cmake options
doc
default


Note: The compilers can also be overridden by setting the environment variables CC and FC.

Note: To see the full output from the compilation, you can use:   make

Code Block
languagebash
titleBuild in verbose mode
$ make VERBOSE=1

 

  

Quick installation guide

Here is an example of a list of commands are example commands that you could use to install ODB API.   It is assumed “>” is the Dollar sign ($) is a typical shell prompt.

Code Block
languagebash
titleBasic installation procedure
$> tar -xzf  ODB_API-x.y.z-Source.tar.gz
>$ mkdir build ; cd build 

>$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/where/you/install/odb_api ../ODB_API-x.y.z-Source 
...

>$ make
>$ ctest
>$ make install


It is recommended that you always build in a clean directory and also install into a clean directory.

...