#! /bin/csh -fx # directory in which pio is built set pio_dir=$1/pio cd $pio_dir # ---------------------------------------------------------------------- # Set options to cmake # ---------------------------------------------------------------------- # Note that some other generic CMAKE options are set in the Makefile set cmake_opts=" -D USER_CMAKE_MODULE_PATH=$CCSMROOT/scripts/ccsm_utils/CMake" set cmake_opts="$cmake_opts -D GENF90_PATH=$CCSMROOT/tools/cprnc/genf90" # ---------------------------------------------------------------------- # create the pio makefile by running cmake (done via a rule # in the system-level makefile) # ---------------------------------------------------------------------- $GMAKE $pio_dir/Makefile MODEL=pio USER_CMAKE_OPTS="$cmake_opts" \ PIO_LIBDIR=$pio_dir \ -f $CASETOOLS/Makefile || exit 1 # ---------------------------------------------------------------------- # create the pio library (or libraries), using the makefile # created by cmake # ---------------------------------------------------------------------- $GMAKE -j $GMAKE_J || exit 2 cp -p lib*.a $pio_dir/../lib cp -p *.h *.mod $pio_dir/../include exit 0