
SET (CMAKE_Fortran_COMPILER ftn CACHE FILEPATH "")
SET (CMAKE_C_COMPILER cc CACHE FILEPATH "")
SET (CMAKE_CXX_COMPILER CC CACHE FILEPATH "")
SET (HOMME_USE_MKL "TRUE" CACHE FILEPATH "") # for Intel

SET (HDF5_DIR $ENV{HDF5_DIR} CACHE FILEPATH "")
SET (NETCDF_DIR $ENV{NETCDF_DIR} CACHE FILEPATH "")
SET (PNETCDF_DIR $ENV{PARALLEL_NETCDF_DIR} CACHE FILEPATH "")
SET (CPRNC_DIR /projects/ccsm/acme/tools/cprnc CACHE FILEPATH "")
SET (PREFER_SHARED FALSE CACHE FILEPATH "")
SET (PREFER_STATIC TRUE CACHE FILEPATH "")

EXECUTE_PROCESS(COMMAND which nf-config
  RESULT_VARIABLE NFCONFIG_PATH_RESULT
  OUTPUT_VARIABLE NFCONFIG_PATH_OUTPUT
  ERROR_VARIABLE  NFCONFIG_PATH_ERROR
  OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(COMMAND ${NFCONFIG_PATH_OUTPUT} --flibs
  RESULT_VARIABLE NFCONFIG_RESULT
  OUTPUT_VARIABLE NFCONFIG_OUTPUT
  ERROR_VARIABLE  NFCONFIG_ERROR
  OUTPUT_STRIP_TRAILING_WHITESPACE
)
IF (${NFCONFIG_ERROR})
  MESSAGE(WARNING "${NETCDF_DIR}/bin/nf-config --flibs produced an error. Default linking will be used.")
ELSE ()
  SET (ADD_LINKER_FLAGS " ${NFCONFIG_OUTPUT} " CACHE STRING "")
ENDIF ()

SET (USE_QUEUING FALSE CACHE BOOL "")
SET (USE_MPIEXEC "aprun" CACHE STRING "")

