Add back setting variables for fconfig.h
Accidently removed variables for fconfig.h in merge. Adding them
back.
@@ -192,6 +192,17 @@ SHOW_VARIABLE(SUNDIALS_PRECISION STRING "${DOCSTR}" "double")
STRING(TOUPPER ${SUNDIALS_PRECISION} SUNDIALS_PRECISION)
SET(PRECISION_LEVEL "#define SUNDIALS_${SUNDIALS_PRECISION}_PRECISION 1")
+# prepare substitution variable FPRECISION_LEVEL for sundials_fconfig.h
+IF(SUNDIALS_PRECISION MATCHES "SINGLE")
+ SET(FPRECISION_LEVEL "4")
+ENDIF(SUNDIALS_PRECISION MATCHES "SINGLE")
+IF(SUNDIALS_PRECISION MATCHES "DOUBLE")
+ SET(FPRECISION_LEVEL "8")
+ENDIF(SUNDIALS_PRECISION MATCHES "DOUBLE")
+IF(SUNDIALS_PRECISION MATCHES "EXTENDED")
+ SET(FPRECISION_LEVEL "16")
+ENDIF(SUNDIALS_PRECISION MATCHES "EXTENDED")
+
# ---------------------------------------------------------------
# Option to specify index type
# ---------------------------------------------------------------
@@ -203,6 +214,14 @@ SHOW_VARIABLE(SUNDIALS_INDEX_TYPE STRING "${DOCSTR}" "int64_t")
STRING(TOUPPER ${SUNDIALS_INDEX_TYPE} SUNDIALS_INDEX_TYPE)
SET(INDEX_TYPE "#define SUNDIALS_${SUNDIALS_INDEX_TYPE} 1")
+# prepare substitution variable FINDEX_TYPE for sundials_fconfig.h
+IF(SUNDIALS_INDEX_TYPE MATCHES "INT32_T")
+ SET(FINDEX_TYPE "4")
+ENDIF(SUNDIALS_INDEX_TYPE MATCHES "INT32_T")
+IF(SUNDIALS_INDEX_TYPE MATCHES "INT64_T")
+ SET(FINDEX_TYPE "8")
+ENDIF(SUNDIALS_INDEX_TYPE MATCHES "INT64_T")
+
# ---------------------------------------------------------------
# Enable Fortran interface?
# ---------------------------------------------------------------
