update tarscript test to build static or shared
@@ -27,8 +27,9 @@ fi
# set file permissions (rwxrwxr-x)
umask 002
-# real and index types to test
+# library types, real types, and index types to test
# NOTE: may need to create answer files for different realtypes
+libtype=( "static" "shared" )
realtype=( "double" )
indextype=( "int32_t" "int64_t" )
@@ -113,6 +114,7 @@ case $module in
;;
*)
echo "Invalid module $module"
+ exit 1
;;
esac
@@ -140,19 +142,29 @@ for tarball in *.tar.gz; do
cd $package
# loop over build options
+ for lt in "${libtype[@]}"; do
for rt in "${realtype[@]}"; do
for it in "${indextype[@]}"; do
# remove old build and install directories
- \rm -rf build_${rt}_${it}
- \rm -rf install_${rt}_${it}
+ \rm -rf build_${rt}_${it}_${lt}
+ \rm -rf install_${rt}_${it}_${lt}
# create new build and install directories
- mkdir build_${rt}_${it}
- mkdir install_${rt}_${it}
+ mkdir build_${rt}_${it}_${lt}
+ mkdir install_${rt}_${it}_${lt}
# move to build directory
- cd build_${rt}_${it}
+ cd build_${rt}_${it}_${lt}
+
+ # set library type to build
+ if [ "${lt}" == "static" ]; then
+ STATIC=ON
+ SHARED=OFF
+ else
+ STATIC=OFF
+ SHARED=ON
+ fi
# -------------------------------------------------------------------
# Enable third party library settings based on precision and index type
@@ -237,7 +249,9 @@ for tarball in *.tar.gz; do
echo "START CMAKE"
cmake \
- -D CMAKE_INSTALL_PREFIX="../install_${rt}_${it}" \
+ -D CMAKE_INSTALL_PREFIX="../install_${rt}_${it}_${lt}" \
+ -D BUILD_STATIC_LIBS="${STATIC}" \
+ -D BUILD_SHARED_LIBS="${SHARED}" \
\
-D BUILD_ARKODE=ON \
-D BUILD_CVODE=ON \
@@ -363,6 +377,7 @@ for tarball in *.tar.gz; do
done
done
+ done
# return to tarball directory
cd ..
