Changeset 166 for tests

Show
Ignore:
Timestamp:
09/18/08 19:52:39 (16 years ago)
Author:
smidl
Message:

Macro for building tests

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • tests/CMakeLists.txt

    r162 r166  
    1515ENDIF(WIN32) 
    1616 
     17# Define macro for testing a file 
     18MACRO(TEST FN) 
     19        add_executable (${FN} ${FN}.cpp) 
     20        target_link_libraries (${FN} ${BdmLibs}) 
     21ENDMACRO(TEST) 
     22 
    1723# Add executable called "helloDemo" that is built from the source files 
    1824# "demo.cxx" and "demo_b.cxx".  The extensions are automatically found. 
    19 add_executable (chmat_test chmat_test.cpp) 
    20 target_link_libraries (chmat_test ${BdmLibs}) 
     25TEST(chmat_test) 
     26TEST(ldmat_test) 
     27TEST(fsqmat_test) 
     28TEST(arx_test) 
     29TEST(loggers_test) 
     30TEST(rv_test) 
     31TEST(merger_test) 
     32TEST(mixef_test) 
     33TEST(egiw_test) 
     34TEST(test0) 
     35TEST(testKF) 
     36TEST(testPF) 
     37TEST(testSmp) 
     38TEST(testEpdf) 
     39TEST(testResample) 
     40TEST(testKF_QR) 
     41TEST(testKF_QRexh) 
    2142 
    22 add_executable (ldmat_test ldmat_test.cpp) 
    23 target_link_libraries (ldmat_test ${BdmLibs}) 
    24  
    25 add_executable (fsqmat_test fsqmat_test.cpp) 
    26 target_link_libraries (fsqmat_test ${BdmLibs}) 
    27  
    28 add_executable (arx_test arx_test.cpp) 
    29 target_link_libraries (arx_test ${BdmLibs}) 
    30  
    31 add_executable (loggers_test loggers_test.cpp) 
    32 target_link_libraries (loggers_test ${BdmLibs}) 
    33  
    34 add_executable (blas_test blas_test.cpp) 
     43add_executable(blas_test blas_test.cpp) 
    3544target_link_libraries (blas_test ${ITppLibs}) 
    3645 
    37 add_executable (rv_test rv_test.cpp) 
    38 target_link_libraries (rv_test ${BdmLibs}) 
    39  
    40 add_executable (merger_test merger_test.cpp) 
    41 target_link_libraries (merger_test ${BdmLibs}) 
    42  
    43 add_executable (test0 test0.cpp) 
    44 add_executable (testKF testKF.cpp) 
    45 add_executable (testPF testPF.cpp) 
    46 add_executable (testSmp testSmp.cpp) 
    47 add_executable (testEpdf testEpdf.cpp) 
    48 add_executable (testResample testResample.cpp) 
    49 add_executable (testKF_QR testKF_QR.cpp) 
    50 add_executable (testKF_QRexh testKF_QRexh.cpp) 
    51 add_executable (testUI testUI.cpp) 
    52  
    53  
    54 # Link the executable to the Hello library. 
    55 target_link_libraries (test0 ${BdmLibs}) 
    56 target_link_libraries (testKF ${BdmLibs}) 
    57 target_link_libraries (testPF ${BdmLibs}) 
    58 target_link_libraries (testSmp ${BdmLibs}) 
    59 target_link_libraries (testEpdf ${BdmLibs}) 
    60 target_link_libraries (testResample ${BdmLibs}) 
    61 target_link_libraries (testKF_QR ${BdmLibs}) 
    62 target_link_libraries (testKF_QRexh ${BdmLibs}) 
     46add_executable(testUI testUI.cpp) 
    6347target_link_libraries (testUI ${BdmLibs} ${XERCES_LIBRARIES}) 
    64  
    65  
    66 # experimental lines building an XSD's hello example  
    67  
    68 # add_executable (test_xsd_hello test_xsd_hello.cxx hello-pskel.hxx hello-pskel.cxx) 
    69 # target_link_libraries (test_xsd_hello ${BdmLibs} ${XERCES_LIBRARIES} ) 
    70 # SET(XSD_ARGS "cxx-parser") 
    71 # ADD_CUSTOM_COMMAND( 
    72 #    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hello-pskel.hxx ${CMAKE_CURRENT_BINARY_DIR}/hello-pskel.cxx 
    73 #    COMMAND ${XSD_EXECUTABLE} 
    74 #    ARGS ${XSD_ARGS} ${CMAKE_CURRENT_SOURCE_DIR}/hello.xsd 
    75 #    MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/hello.xsd 
    76 # ) 
    77 #  
    78