##############################################################################
# \file  CMakeLists.txt
# \brief Build configuration of software testing.
#
# Unit tests test only single functions, classes, and modules of the software.
# System tests, on the other side, execute the programs of this package with
# given test input data and compare the output of the programs to the expected
# results.
#
# The built test executables can be found in TESTING_RUNTIME_DIR.
# The test output shall be written to TESTING_OUTPUT_DIR. In most cases,
# a subdirectory for each test should be created under this output directory.
#
# Copyright (c) University of Pennsylvania. All rights reserved.
# See COPYING file or https://www.rad.upenn.edu/sbia/software/license.html.
#
# Contact: SBIA Group <sbia-software at uphs.upenn.edu>
##############################################################################

# ============================================================================
# output directories
# ============================================================================

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${TESTING_RUNTIME_DIR}")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${TESTING_RUNTIME_DIR}")
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${TESTING_RUNTIME_DIR}")

# ============================================================================
# tests : Digits_GenDisc_tradeOffCurve
# ============================================================================
basis_add_executable (Digits_GenDisc_tradeOffCurve "Digits_GenDisc_tradeOffCurve.m" TEST)

basis_target_link_libraries (
  Digits_GenDisc_tradeOffCurve
    blockDiag
    grpNorm 
    readmedicalimage_gateway
    writemedicalimage_gateway
    ${LIBLINEAR_MEX_FILES}
    ${MOSEK_MEX_FILES}
)

basis_add_test(Digits_GenDisc_tradeOffCurve COMMAND Digits_GenDisc_tradeOffCurve)

basis_add_executable (runBatchExperiment_Digits_GenDisc_tradeOffCurve "runBatchExperiment_Digits_GenDisc_tradeOffCurve.py.in" TEST)

# =========================================================================
# test : simulateBrainEffect
# =========================================================================

basis_add_executable (simulateBrainEffect     "simulateBrainEffect.m"   TEST)

basis_target_link_libraries (
  simulateBrainEffect
    blockDiag
    grpNorm 
    readmedicalimage_gateway
    writemedicalimage_gateway
    ${LIBLINEAR_MEX_FILES}
    ${MOSEK_MEX_FILES}
)

basis_add_test(simulateBrainEffect  COMMAND  simulateBrainEffect)




