Compiling rasdaman using CMake (v3.0+)

  1. Clone rasdaman source code:
    git clone git:// rasdaman
  2. Create a build directory:
    mkdir build
  3. Configure rasdaman to be build in the build directory (see the section below for the list of available configurations):
    cd build
    cmake <path to rasdaman source directory> 
  4. Compile and install:
    make (or make -j)
    make install

Available configurations

1. Command line configuration:

CMake accepts command line parameters using -D specifier. The list of available configurations in rasdaman are listed below:

// Installation directory.

// Enable  this if you need detailed output from the make process. (default: OFF)

// Change the default Base DBMS (sqlite, postgresql) (default: sqlite)

// This feature enables generation of binaries that contain extra code for benchmark output. (default: OFF)

// Enable debug symbols and define RMANDEBUG and DEBUG. If you do not need RMANDEBUG, only create a Debug build using CMake.(default: OFF)

// Enable or disable compilation and installation of Java-based components, including rasj and petascope.(default: ON)

// Compile and install R package. (default: OFF)

// Enable compiling in strict mode: warnings terminate compilation. (default: OFF)

// The path where the server stores blobs as files. (default: <rasdaman_install_dir>/data)

// Generate doxygen documentation during build.(default: OFF)

// Generate position independent code (PIC) (default: ON)

// Set the Java application deployment mode (external or embedded) (default: external)

// The path where the servers will store their logs. (default: <rasdaman_install_dir>/log)

// Set the network protocol used in rasdaman (rasnet or rnp). (default: rasnet)

// Change the default DBMS used by petascope (postgresql, hsqldb, sqlite) (default: postgresql)

// This feature enables the inclusion of GDAL library during installation. (default: ON)

// This feature enables the inclusion of GRIB library during installation. (default: OFF)

// This feature enables the inclusion of HDF4 library during installation. (default: OFF)

// This feature enables the inclusion of netCDF library during installation. (default: OFF)

// The path where the war files should be installed. (default: <rasdaman_install_dir>/share/rasdaman/war

// You can add the flags for g++ by adding these values in DCMAKE_CXX_FLAGS (e.g: -DCMAKE_CXX_FLAGS=" -O1" it will append the optimization flag " -01" in g++).

Example: Configure rasdaman to be installed in /home/rasdaman/install, with WAR directory in /var/lib/tomcat/webapps, using NETCDF

cmake ../rasdaman -DCMAKE_INSTALL_PREFIX=/home/rasdaman/install -DWAR_DIR=/var/lib/tomcat/webapps -DUSE_NETCDF=ON

2. Using cmake-gui

  • install cmake-gui or cmake-qt-gui
  • specify the source and build directories
  • click on generate "Configure"
  • select the desired configuration from GUI
  • click on "Generate" to generate the configuration
  • go to the build directory and run make

Getting better build times

The cmake build of rasdaman supports parallel builds. The below command can be used to build rasdaman on <no of cores> - 1 cores (if the machine where rasdaman is built has multiple cores):

make -j $(($(nproc) - 1))

The build time can be further improved by installing ccache.

Last modified 3 months ago Last modified on Jan 3, 2017 11:21:51 AM