INCLUDE(FortranSettings)

TRIBITS_SUBPACKAGE(Nemesis)

SET(NEMESIS_VERSION_MAJOR "5")
SET(NEMESIS_VERSION_MINOR "15")
SET(NEMESIS_VERSION_PATCH "0")
SET(NEMESIS_VERSION "${NEMESIS_VERSION_MAJOR}.${NEMESIS_VERSION_MINOR}")
SET(NEMESIS_VERSION_FULL "${NEMESIS_VERSION}.${NEMESIS_VERSION_PATCH}")

SET(HEADERS "ne_nemesisI.h")

CONFIGURE_FILE(
  ${CMAKE_CURRENT_SOURCE_DIR}/nemesis_cfg.h.in
  ${CMAKE_CURRENT_BINARY_DIR}/nemesis_cfg.h
  @ONLY IMMEDIATE)

INCLUDE_DIRECTORIES(
  "${CMAKE_CURRENT_SOURCE_DIR}"
  "${CMAKE_CURRENT_BINARY_DIR}"
  )

SET(SOURCES
  nemesis_wrapper.c
  )

TRIBITS_ADD_LIBRARY(
  nemesis
  HEADERS ${HEADERS}
  SOURCES ${SOURCES}
  )

IF (${PACKAGE_NAME}_ENABLE_TESTS)
  TRIBITS_ADD_TEST(
    ne_ctest_wrap
    NAME ne_ctest_wrap
    NUM_MPI_PROCS 1
    )
ENDIF()

TRIBITS_ADD_EXECUTABLE(
  ne_ctest_wrap
  SOURCES ne_ctest_wrap.c
  )

TRIBITS_SUBPACKAGE_POSTPROCESS()

