TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

IF(NOT MueLu_ENABLE_EXPLICIT_INSTANTIATION OR (MueLu_ENABLE_EXPLICIT_INSTANTIATION AND MueLu_TPETRA_INST_INT_INT))

  IF(${PACKAGE_NAME}_ENABLE_ThyraTpetraAdapters AND ${PACKAGE_NAME}_ENABLE_Teko)

    TRIBITS_ADD_EXECUTABLE(
      Q2Q1
      SOURCES Q2Q1.cpp MueLu_Q2Q1PFactory.hpp MueLu_Q2Q1uPFactory.hpp
      COMM serial mpi
    )

    TRIBITS_COPY_FILES_TO_BINARY_DIR(
      Q2Q1_cp
      SOURCE_FILES
        driver.xml
        Q2Q1_9x9_A.mm
        Q2Q1_9x9_AForPat.mm
        Q2Q1_9x9_B.mm
        Q2Q1_9x9_BigA.mm
        Q2Q1_9x9_Bt.mm
        Q2Q1_9x9_p2vMap.mm
        Q2Q1_9x9_PresCoords.mm
        Q2Q1_9x9_VelCoords.mm
        status.py
    )
  ENDIF()

  # LBV on Sept 18th 2019: commenting out the test as there is no will to fix Thyra to have it work...
  # #
  # # Tests
  # #

  # INCLUDE(XpetraAddTest)

  # IF (${PACKAGE_NAME}_ENABLE_ThyraTpetraAdapters AND ${PACKAGE_NAME}_ENABLE_Teko)
  #   XPETRA_ADD_TEST_TPETRA(Q2Q1 1)
  # ENDIF()

ENDIF()
