# Make sure the compiler can find include files from our Bdm library.
include_directories (${BDM_SOURCE_DIR}/bdm)

# Make sure the linker can find the Hello library once it is built.
link_directories (${BDM_BINARY_DIR}/bdm)

## Save all needed libraries in variable BdmLibs
#SET(BdmLibs bdm itpp_debug)
SET(BdmLibs bdm itpp)

IF(WIN32)
	SET(BdmLibs ${BdmLibs} libacml_dll)
ENDIF(WIN32)

# Add executable called "helloDemo" that is built from the source files
# "demo.cxx" and "demo_b.cxx".  The extensions are automatically found.
add_executable (chmat_test chmat_test.cpp)
target_link_libraries (chmat_test ${BdmLibs})

add_executable (ldmat_test ldmat_test.cpp)
target_link_libraries (ldmat_test ${BdmLibs})

add_executable (fsqmat_test fsqmat_test.cpp)
target_link_libraries (fsqmat_test ${BdmLibs})

add_executable (arx_test arx_test.cpp)
target_link_libraries (arx_test ${BdmLibs})

add_executable (loggers_test loggers_test.cpp)
target_link_libraries (loggers_test ${BdmLibs})

add_executable (blas_test blas_test.cpp)
target_link_libraries (blas_test itpp)

add_executable (test0 test0.cpp)
add_executable (testKF testKF.cpp)
add_executable (testPF testPF.cpp)
add_executable (testSmp testSmp.cpp)
add_executable (testEpdf testEpdf.cpp)
add_executable (testResample testResample.cpp)
add_executable (testKF_QR testKF_QR.cpp)
add_executable (testKF_QRexh testKF_QRexh.cpp)
#add_executable (testUI testUI.cpp)


# Link the executable to the Hello library.
target_link_libraries (test0 ${BdmLibs})
target_link_libraries (testKF ${BdmLibs})
target_link_libraries (testPF ${BdmLibs})
target_link_libraries (testSmp ${BdmLibs})
target_link_libraries (testEpdf ${BdmLibs})
target_link_libraries (testResample ${BdmLibs})
target_link_libraries (testKF_QR ${BdmLibs})
target_link_libraries (testKF_QRexh ${BdmLibs})
#target_link_libraries (testUI ${BdmLibs} ${XERCES_LIBRARIES})


# experimental lines building an XSD's hello example 

# add_executable (test_xsd_hello test_xsd_hello.cxx hello-pskel.hxx hello-pskel.cxx)
# target_link_libraries (test_xsd_hello ${BdmLibs} ${XERCES_LIBRARIES} )
# SET(XSD_ARGS "cxx-parser")
# ADD_CUSTOM_COMMAND(
#    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hello-pskel.hxx ${CMAKE_CURRENT_BINARY_DIR}/hello-pskel.cxx
#    COMMAND ${XSD_EXECUTABLE}
#    ARGS ${XSD_ARGS} ${CMAKE_CURRENT_SOURCE_DIR}/hello.xsd
#    MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/hello.xsd
# )
# 

