Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add optional build flags

...

Code Block
$ cd elmer-build

--- For elmer use
$ cmake -C ../elmer-opts.cmake ../elmerfem 

--- For elmer/ice, add the bool flag
$ cmake -C ../elmer-opts.cmake ../elmerfem -DWITH_ElmerIce:BOOL=TRUE 

--- Add MPI support 
$ cmake -C ../elmer-opts.cmake ../elmerfem -DWITH_ElmerIce:BOOL=TRUE -DWITH_MPI:BOOL=TRUE 

...
-- ------------------------------------------------
--   Package filename: elmerfem-8.4-9d3f59b-20190807_Linux-x86_64 
--   Patch version: 8.4-9d3f59b 
-- Configuring done
-- Generating done
-- Build files have been written to: ..... /elmer-build

--- To explicitly include LUA (with -DWITH_LUA:BOOL=TRUE) in compilation, in case the following error is encountered:

MAIN: Reading Model: Stokes_steady_vec_lua.sif
LoadInputFile: Scanning input file: Stokes_steady_vec_lua.sif
ERROR:: ReadAndTrim: LUA not included, cannot continue
STOP 1

--- To explicitly set installation directory
-DCMAKE_INSTALL_PREFIX=../install 

--- Optional: To try different libraries
-DLAPACK_LIBRARIES="-L/usr/lib/x86_64-linux-gnu/lapack -llapack "


The cmake tool will now inform if any libraries are missing. The build configuration can be further edited using e.g. ccmake tool or cmake-gui application.

...