Versions Compared

Key

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

...

cmake options
doc
default
CMAKE_INSTALL_PREFIXwhere you want to install your Magics library /usr/local
CMAKE_BUILD_TYPE

to select the type of compilation:

  • Debug
  • RelWithDebInfo
  • Release (fully optimised compiler options)
  • Production
Production
CMAKE_CXX_FLAGS More flags  for the C++ compiler 
ENABLE_PYTHONenable python interfaceon
ENABLE_GUIenable build of ecflowviewon
BOOST_ROOT

where to find boost ( if non-standard installation  )

If not specified cmake will look for an environment variable

of the same name.

 

If auto, CMake will try to enable the feature, but will not fail if it can not.

The  C++  compilers are chosen by CMake. (This can be overwritten by setting the environment variables CXX on the command line before you call cmake, to the preferred compiler).

Further the variable CMAKE_CXX_FLAGS can be used to set compiler flags for optimisation or debugging. 

Code Block
languagebash
titlecmake/ecbuild
cd $WK
mkdir build; cd build;

# Go with defaults
cmake .. 

# build the most optimised executables  
# cmake .. -DCMAKE_BUILD_TYPE=Release 

# Override install prefix, build the most optimised executables 
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/apps/ecflow -DCMAKE_BUILD_TYPE=Release  

# do not build the gui.
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/apps/ecflow -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=OFF

# If you do not need the python api, use:
# cmake .. -DENABLE_PYTHON=OFF

# Use -j option to speed up compilation. Determine number of cpu's
CPUS=$(lscpu -p | grep -v '#' | wc -l)
make -j${CPUS}
make test
make install

 

To use the ecFlow Python Api , you need to add/change PYTHONPATH . 

 

 

Code Block
languagebash
export PYTHONPATH=$PYTHONPATH:/usr/local/apps/ecflow/4.0.8/lib/python2.7/site-packages/ecflow

 

...