###
#
# @file CMakeLists.txt
#
#  PLASMA is a software package provided by Univ. of Tennessee,
#  Univ. of California Berkeley and Univ. of Colorado Denver
#
# @version 2.5.1
# @author Asim YarKhan
# @date 2010-11-15
#
###

add_subdirectory(lin)

INCLUDE( ${CMAKE_SOURCE_DIR}/GenerateZDCS.cmake OPTIONAL )

set( testing_ZHDR testing_zmain.h )
set( testing_ZSRC
        testing_zmain.c
	testing_zgebrd.c
        testing_zgesv.c
        testing_zgesv_incpiv.c
        testing_zgetri.c
        testing_zgesvd.c
        testing_zgesdd.c
        testing_zgels.c
        testing_zposv.c
        testing_zpotri.c
        testing_zgemm.c
        testing_zhetrd.c
        testing_zheev.c
        testing_zheevd.c
        testing_zheevr.c
        testing_zhegst.c
        testing_zhegv.c
        testing_zhegvd.c
        testing_zsyrk.c
        testing_zsyr2k.c
        testing_zsymm.c
        testing_ztrsm.c
        testing_ztrmm.c
        testing_zlange.c
        testing_zherk.c
        testing_zher2k.c
        testing_zhemm.c
        testing_zgecfi.c
        testing_zgetmi.c
        testing_zcposv.c
        testing_zcgesv.c
        testing_zcungesv.c
        testing_zpemv.c
)

set( testing_CHDR testing_cmain.h )
set( testing_DHDR testing_dmain.h )
set( testing_SHDR testing_smain.h )
set( testing_CSRC
        testing_cmain.c
	testing_cgebrd.c
        testing_cgesv.c
        testing_cgesv_incpiv.c
        testing_cgetri.c
        testing_cgesvd.c
        testing_cgesdd.c
        testing_cgels.c
        testing_cposv.c
        testing_cpotri.c
        testing_cgemm.c
        testing_chetrd.c
        testing_cheev.c
        testing_cheevd.c
        testing_cheevr.c
        testing_chegst.c
        testing_chegv.c
        testing_chegvd.c
        testing_csyrk.c
        testing_csyr2k.c
        testing_csymm.c
        testing_ctrsm.c
        testing_ctrmm.c
        testing_clange.c
        testing_cherk.c
        testing_cher2k.c
        testing_chemm.c
        testing_cgecfi.c
        testing_cgetmi.c
        testing_cpemv.c
        )
set(testing_DSRC
        testing_dmain.c
	testing_dgebrd.c
        testing_dgesv.c
        testing_dgesv_incpiv.c
        testing_dgetri.c
        testing_dgesvd.c
        testing_dgesdd.c
        testing_dgels.c
        testing_dposv.c
        testing_dpotri.c
        testing_dgemm.c
        testing_dsytrd.c
        testing_dsyev.c
        testing_dsyevd.c
        testing_dsyevr.c
        testing_dsygst.c
        testing_dsygv.c
        testing_dsygvd.c
        testing_dsyrk.c
        testing_dsyr2k.c
        testing_dsymm.c
        testing_dtrsm.c
        testing_dtrmm.c
        testing_dlange.c
        testing_dgecfi.c
        testing_dgetmi.c
        testing_dsposv.c
        testing_dsgesv.c
        testing_dsungesv.c
        testing_dpemv.c
        )
set( testing_SSRC
        testing_smain.c
	testing_sgebrd.c
        testing_sgesv.c
        testing_sgesv_incpiv.c
        testing_sgetri.c
        testing_sgesvd.c
        testing_sgesdd.c
        testing_sgels.c
        testing_sposv.c
        testing_spotri.c
        testing_sgemm.c
        testing_ssytrd.c
        testing_ssyev.c
        testing_ssyevd.c
        testing_ssyevr.c
        testing_ssygst.c
        testing_ssygv.c
        testing_ssygvd.c
        testing_ssyrk.c
        testing_ssyr2k.c
        testing_ssymm.c
        testing_strsm.c
        testing_strmm.c
        testing_slange.c
        testing_sgecfi.c
        testing_sgetmi.c
        testing_spemv.c
        )

set( testing_ZSRC ${testing_ZHDR} ${testing_ZSRC} )
set( testing_CSRC ${testing_CHDR} ${testing_CSRC} )
set( testing_DSRC ${testing_DHDR} ${testing_DSRC} )
set( testing_SSRC ${testing_SHDR} ${testing_SSRC} )

set( testing_SRCS ${testing_ZSRC} ${testing_CSRC} ${testing_DSRC} ${testing_SSRC} )

add_executable( ztesting ${testing_ZSRC} )
add_executable( ctesting ${testing_CSRC} )
add_executable( dtesting ${testing_DSRC} )
add_executable( stesting ${testing_SSRC} )

set( EXES ztesting ctesting dtesting stesting )

foreach( exe ${EXES} )
  PLASMA_SETUP_C_MAIN( ${exe} )
endforeach()

INSTALL( TARGETS ${EXES} DESTINATION testing )
INSTALL( PROGRAMS plasma_testing.py DESTINATION testing )

# INSTALL( FILES ${testing_SRCS} CMakeLists.txt DESTINATION testing )
