From 400076b742100758ddc0e6c1777edfde7eb0ee33 Mon Sep 17 00:00:00 2001 From: zhangc43 Date: Thu, 25 Feb 2016 15:40:10 -0500 Subject: [PATCH] cumulative modification to CMake build system --- build_FEM.sh | 0 build_marc.sh | 0 build_spectral.sh | 25 ++++++++++++++++++++----- 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 build_FEM.sh create mode 100644 build_marc.sh diff --git a/build_FEM.sh b/build_FEM.sh new file mode 100644 index 000000000..e69de29bb diff --git a/build_marc.sh b/build_marc.sh new file mode 100644 index 000000000..e69de29bb diff --git a/build_spectral.sh b/build_spectral.sh index 1f8f8473f..b21e633eb 100755 --- a/build_spectral.sh +++ b/build_spectral.sh @@ -2,16 +2,31 @@ cat README echo "Building spectral solver with ${FC}" +DAMASKVERSION :=$(shell cat ../VERSION) # prepare building directory -if [ ! -d build_spectral ] ; then - mkdir build_spectral +if [ -d build_spectral ] ; then + rm -rf build_spectral fi +mkdir build_spectral cd build_spectral -# start building -cmake -D PETSC_DIR=${PETSC_DIR} \ - -D HDF5=${HDF5} \ +## +# CMake call +# PETSC_DIR | PETSC directory +# HDF5_DIR | HDF5 library (same compiler for DAMASK) +# DAMASK_ROOT | DAMASK source location +# DAMASK_V | DAMASK current revision +# CMAKE_BUILD_TYPE | Default set to release (no debugging output) +# OPENMP | "ON" will turn on OPENMP support +# OPTIMIZATION | [OFF,DEFENSIVE,AGGRESSIVE,ULTRA] +cmake -D PETSC_DIR=${PETSC_DIR} \ + -D HDF5_DIR=${HDF5_DIR} \ + -D DAMASK_ROOT=.. \ + -D DAMASK_V=${DAMASKVERSION} \ + -D CMAKE_BUILD_TYPE=RELEASE \ + -D OPENMP=ON \ + -D OPTIMIZATION=DEFENSIVE \ .. # instruction for compiling